summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/Controller/UnitController.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-08-29 19:44:31 +0800
committerchai <chaifix@163.com>2021-08-29 19:44:31 +0800
commitcf4e1f9833c810e18429ddf40f4bcf9052ff17ac (patch)
tree2cfae8edc3966b084baabfd5366c1c928a113c29 /Assets/Scripts/Unit/Controller/UnitController.cs
parentd88698a454fbfe306bd0142660172bdd6e93ecf3 (diff)
*monster
Diffstat (limited to 'Assets/Scripts/Unit/Controller/UnitController.cs')
-rw-r--r--Assets/Scripts/Unit/Controller/UnitController.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/Assets/Scripts/Unit/Controller/UnitController.cs b/Assets/Scripts/Unit/Controller/UnitController.cs
index 5523f256..b1db29d4 100644
--- a/Assets/Scripts/Unit/Controller/UnitController.cs
+++ b/Assets/Scripts/Unit/Controller/UnitController.cs
@@ -16,8 +16,13 @@ public class UnitController : MonoBehaviour/*, Interactable*/
public UnitRender unitRender;
public UnitState unitState;
+ 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; } }
public UnitSkill unitSkill;
@@ -78,12 +83,6 @@ public class UnitController : MonoBehaviour/*, Interactable*/
unitRender = gameObject.GetOrAddComponent<UnitRender>();
unitRender.Initialize();
- unitState = gameObject.GetOrAddComponent<UnitState>();
- unitState.Initialize();
-
- unitAnimation = gameObject.GetOrAddComponent<UnitAnimation>();
- unitAnimation.Initialize();
-
unitSkill = gameObject.GetOrAddComponent<UnitSkill>();
unitSkill.Initialize();