From cf4e1f9833c810e18429ddf40f4bcf9052ff17ac Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 29 Aug 2021 19:44:31 +0800 Subject: *monster --- Assets/Scripts/Unit/Controller/UnitController.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Assets/Scripts/Unit/Controller/UnitController.cs') 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.Initialize(); - unitState = gameObject.GetOrAddComponent(); - unitState.Initialize(); - - unitAnimation = gameObject.GetOrAddComponent(); - unitAnimation.Initialize(); - unitSkill = gameObject.GetOrAddComponent(); unitSkill.Initialize(); -- cgit v1.1-26-g67d0