diff options
author | chai <chaifix@163.com> | 2021-09-15 19:58:59 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-09-15 19:58:59 +0800 |
commit | 28b89971f0d3fd246443450c87f33996716facb3 (patch) | |
tree | f7ab8055490d06a39ea52de6ab8f6f701c6b3733 /Assets/Scripts/Unit/Controller/UnitController.cs | |
parent | 5c559adec82205c3ce9427d6bfef5535867e2553 (diff) |
*misc
Diffstat (limited to 'Assets/Scripts/Unit/Controller/UnitController.cs')
-rw-r--r-- | Assets/Scripts/Unit/Controller/UnitController.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Assets/Scripts/Unit/Controller/UnitController.cs b/Assets/Scripts/Unit/Controller/UnitController.cs index 3c09e5e6..ff3d9df2 100644 --- a/Assets/Scripts/Unit/Controller/UnitController.cs +++ b/Assets/Scripts/Unit/Controller/UnitController.cs @@ -28,7 +28,6 @@ public class UnitController : MonoBehaviour/*, Interactable*/ public PCState pcState { get { return unitState as PCState; } }
public MonsterState monsterState { get { return unitState as MonsterState; } }
-
public UnitAnimation unitAnimation;
public PCAnimation pcAnimation { get { return unitAnimation as PCAnimation; } }
public MonsterAnimation monsterAnimation { get { return unitAnimation as MonsterAnimation; } }
@@ -41,6 +40,8 @@ public class UnitController : MonoBehaviour/*, Interactable*/ public UnitDetail unitDetail;
+ public UnitBody unitBody;
+
public GameObject unitObj; // 角色模型
#region 事件监听
@@ -121,7 +122,11 @@ public class UnitController : MonoBehaviour/*, Interactable*/ unitCollider = gameObject.GetOrAddComponent<UnitCollider>();
unitCollider.Initialize();
- unitDetail = gameObject.GetComponentInChildren<UnitDetail>();
+ unitBody = gameObject.GetOrAddComponent<UnitBody>();
+ unitBody.Initialize();
+
+ unitDetail = gameObject.GetComponentInChildren<UnitDetail>();
+
}
public virtual void Update()
|