mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-15 09:16:08 +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;
|
IsoWorld _iso_world = null;
|
||||||
public IsoWorld GetIsoWorld() {
|
public IsoWorld GetIsoWorld() {
|
||||||
if ( !_iso_world ) {
|
if ( !_iso_world ) {
|
||||||
@@ -96,10 +105,7 @@ public class IsoObject : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void FixAlignment() {
|
public void FixAlignment() {
|
||||||
_position.Set(
|
_position = TilePosition;
|
||||||
Mathf.Round(_position.x),
|
|
||||||
Mathf.Round(_position.y),
|
|
||||||
Mathf.Round(_position.z));
|
|
||||||
FixTransform();
|
FixTransform();
|
||||||
MartDirtyIsoWorld();
|
MartDirtyIsoWorld();
|
||||||
if ( Application.isEditor ) {
|
if ( Application.isEditor ) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Global
|
|||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(MonoDevelopProperties) = preSolution
|
GlobalSection(MonoDevelopProperties) = preSolution
|
||||||
StartupItem = Assembly-CSharp.csproj
|
StartupItem = Assembly-CSharp.csproj
|
||||||
Policies = $0
|
Policies = $0
|
||||||
$0.TextStylePolicy = $1
|
$0.TextStylePolicy = $1
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Global
|
|||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(MonoDevelopProperties) = preSolution
|
GlobalSection(MonoDevelopProperties) = preSolution
|
||||||
StartupItem = Assembly-CSharp.csproj
|
StartupItem = Assembly-CSharp.csproj
|
||||||
Policies = $0
|
Policies = $0
|
||||||
$0.TextStylePolicy = $1
|
$0.TextStylePolicy = $1
|
||||||
|
|||||||
Reference in New Issue
Block a user