mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-15 01:12:05 +07:00
undo-redo for create tiled map and property holder
This commit is contained in:
@@ -10,11 +10,11 @@ namespace IsoTools {
|
||||
[ExecuteInEditMode, DisallowMultipleComponent]
|
||||
public class IsoObject : MonoBehaviour {
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Mode
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
public enum Mode {
|
||||
Mode2d,
|
||||
@@ -32,11 +32,11 @@ namespace IsoTools {
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Size
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
[SerializeField]
|
||||
Vector3 _size = Vector3.one;
|
||||
@@ -76,11 +76,11 @@ namespace IsoTools {
|
||||
get { return new Vector2(sizeX, sizeZ); }
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Position
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
[SerializeField]
|
||||
Vector3 _position = Vector3.zero;
|
||||
@@ -120,11 +120,11 @@ namespace IsoTools {
|
||||
get { return new Vector2(positionX, positionZ); }
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// TilePosition
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
public Vector3 tilePosition {
|
||||
get { return IsoUtils.Vec3Round(position); }
|
||||
@@ -158,11 +158,11 @@ namespace IsoTools {
|
||||
get { return new Vector2(tilePositionX, tilePositionZ); }
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Internal
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
public class InternalState {
|
||||
public bool Dirty = false;
|
||||
@@ -178,11 +178,11 @@ namespace IsoTools {
|
||||
|
||||
public InternalState Internal = new InternalState();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// For editor
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#if UNITY_EDITOR
|
||||
Vector3 _lastSize = Vector3.zero;
|
||||
@@ -203,11 +203,11 @@ namespace IsoTools {
|
||||
}
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Functions
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
IsoWorld _isoWorld = null;
|
||||
public IsoWorld isoWorld {
|
||||
@@ -270,11 +270,11 @@ namespace IsoTools {
|
||||
#endif
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Messages
|
||||
//
|
||||
// ------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void Awake() {
|
||||
Internal.SelfDepends = new HashSet<IsoObject>(new IsoObject[47]);
|
||||
@@ -328,4 +328,4 @@ namespace IsoTools {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} // namespace IsoTools
|
||||
} // namespace IsoTools
|
||||
|
||||
Reference in New Issue
Block a user