// State protected override void InitState() { base.InitState(); State idleState = new PlayerIdleState(); idleState.Init(this); _stateDic[eState.IDLE] = idleState; State attackState = new PlayerAttackState(); attackState.Init(this); _stateDic[eState.IDLE] = attackState; }
override protected void InitState() { base.InitState(); State attackState = new PlayerAttackState(); attackState.Init(this); _stateDic[eSTATE.ATTACK] = attackState; State moveState = new MoveState(); moveState.Init(this); _stateDic[eSTATE.MOVE] = moveState; State hitState = new PlayerHitState(); hitState.Init(this); _stateDic[eSTATE.HIT] = hitState; State skillOneState = new SkillOne(); skillOneState.Init(this); _stateDic[eSTATE.HIT] = skillOneState; State skillTwoState = new SkillTwo(); skillTwoState.Init(this); _stateDic[eSTATE.HIT] = skillTwoState; State skillThreeState = new SkillThree(); skillThreeState.Init(this); _stateDic[eSTATE.HIT] = skillThreeState; State idleState = new PlayerIdleState(); idleState.Init(this); _stateDic[eSTATE.IDLE] = idleState; }