diff options
author | chai <chaifix@163.com> | 2021-09-28 19:12:34 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-09-28 19:12:34 +0800 |
commit | 16e4a47beaf7786b63404d4a8356e45d70a393b5 (patch) | |
tree | 15391f9e57cb8d39705bfc13189956262e9e7fe7 /Assets/Scripts/Unit/Controller/UnitController.cs | |
parent | 10ea61d63a87931a98c3591735f0d70e10939401 (diff) |
*unit lens
Diffstat (limited to 'Assets/Scripts/Unit/Controller/UnitController.cs')
-rw-r--r-- | Assets/Scripts/Unit/Controller/UnitController.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Assets/Scripts/Unit/Controller/UnitController.cs b/Assets/Scripts/Unit/Controller/UnitController.cs index 3b4ab12d..34490feb 100644 --- a/Assets/Scripts/Unit/Controller/UnitController.cs +++ b/Assets/Scripts/Unit/Controller/UnitController.cs @@ -228,5 +228,14 @@ public class UnitController : MonoBehaviour/*, Interactable*/ transform.position = pos;
}
-}
+ // 生成当前的快照
+ public UnitSnapshotInfo TakeSnapshot()
+ {
+ UnitSnapshotInfo snapshot = new UnitSnapshotInfo();
+ snapshot.unit = this;
+ snapshot.animStateHash = unitAnimation.baseLayer.stateHash;
+ snapshot.normalizedTime = unitAnimation.baseLayer.playbackNormalizedTime;
+ return snapshot;
+ }
+}
\ No newline at end of file |