protected override void Start() { base.Start(); idleState = new GoblinArcher_IdleState(finiteStateMachine, this, "idle", idleStateData, this); moveState = new GoblinArcher_MoveState(finiteStateMachine, this, "move", moveStateData, this); playerDetectedState = new GoblinArcher_PlayerDetectedState(finiteStateMachine, this, "playerDetected", playerDetectedStateData, this); lookForPlayerState = new GoblinArcher_LookForPlayerState(finiteStateMachine, this, "lookForPlayer", lookForPlayerStateData, this); meleeAttackState = new GoblinArcher_MeleeAttackState(finiteStateMachine, this, "meleeAttack", meleeAttackPosition, meleeAttackStateData, this); stunState = new GoblinArcher_StunState(finiteStateMachine, this, "stun", stunStateData, this); deadState = new GoblinArcher_DeadState(finiteStateMachine, this, "dead", deadStateData, this); dodgeState = new GoblinArcher_DodgeState(finiteStateMachine, this, "dodge", dodgeStateData, this); rangedAttackState = new GoblinArcher_RangedAttackState(finiteStateMachine, this, "rangedAttack", rangedAttackPosition, rangedAttackStateData, this); finiteStateMachine.Initialize(moveState); }
protected override void Start() { base.Start(); IdleState = new GoblinArcher_IdleState(FiniteStateMachine, this, "idle", _idleStateData, this); MoveState = new GoblinArcher_MoveState(FiniteStateMachine, this, "move", _moveStateData, this); PlayerDetectedState = new GoblinArcher_PlayerDetectedState(FiniteStateMachine, this, "playerDetected", _playerDetectedStateData, this); LookForPlayerState = new GoblinArcher_LookForPlayerState(FiniteStateMachine, this, "lookForPlayer", _lookForPlayerStateData, this); MeleeAttackState = new GoblinArcher_MeleeAttackState(FiniteStateMachine, this, "meleeAttack", _meleeAttackPosition, _meleeAttackStateData, this); DodgeState = new GoblinArcher_DodgeState(FiniteStateMachine, this, "dodge", _dodgeStateData, this); RangedAttackState = new GoblinArcher_RangedAttackState(FiniteStateMachine, this, "rangedAttack", _rangedAttackPosition, _rangedAttackStateData, this); DamageState = new GoblinArcher_DamageState(FiniteStateMachine, this, "damage", _damageStateData, this); StunState = new GoblinArcher_StunState(FiniteStateMachine, this, "stun", _stunStateData, this); DeadState = new GoblinArcher_DeadState(FiniteStateMachine, this, "dead", _deadStateData, this); FiniteStateMachine.Initialize(MoveState); DissolveEffect = new DissolveEffect(); }