mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-15 01:12:05 +07:00
added TilePosition function
This commit is contained in:
@@ -80,6 +80,15 @@ public class IsoObject : MonoBehaviour {
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 TilePosition {
|
||||
get {
|
||||
return new Vector3(
|
||||
Mathf.Round(Position.x),
|
||||
Mathf.Round(Position.y),
|
||||
Mathf.Round(Position.z));
|
||||
}
|
||||
}
|
||||
|
||||
IsoWorld _iso_world = null;
|
||||
public IsoWorld GetIsoWorld() {
|
||||
if ( !_iso_world ) {
|
||||
@@ -96,10 +105,7 @@ public class IsoObject : MonoBehaviour {
|
||||
}
|
||||
|
||||
public void FixAlignment() {
|
||||
_position.Set(
|
||||
Mathf.Round(_position.x),
|
||||
Mathf.Round(_position.y),
|
||||
Mathf.Round(_position.z));
|
||||
_position = TilePosition;
|
||||
FixTransform();
|
||||
MartDirtyIsoWorld();
|
||||
if ( Application.isEditor ) {
|
||||
|
||||
@@ -17,7 +17,7 @@ Global
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
StartupItem = Assembly-CSharp.csproj
|
||||
Policies = $0
|
||||
$0.TextStylePolicy = $1
|
||||
|
||||
@@ -17,7 +17,7 @@ Global
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
StartupItem = Assembly-CSharp.csproj
|
||||
Policies = $0
|
||||
$0.TextStylePolicy = $1
|
||||
|
||||
Reference in New Issue
Block a user