public override void Start() { base.Start(); moveState = new Slime_MoveState(this, stateMachine, "move", moveStateData, this); idleState = new Slime_IdleState(this, stateMachine, "idle", idleStateData, this); playerDetectedState = new Slime_PlayerDetectedState(this, stateMachine, "playerDetected", playerDetectedStateData, this); meleeAttackState = new Slime_MeleeAttackState(this, stateMachine, "meleeAttack", meleeAttackPosition, meleeAttackStateData, this); lookForPlayerState = new Slime_LookForPlayerState(this, stateMachine, "lookForPlayer", lookForPlayerStateData, this); stunState = new Slime_StunState(this, stateMachine, "stun", stunStateData, this); deadState = new Slime_DeadState(this, stateMachine, "dead", deadStateData, this); dodgeState = new Slime_DodgeState(this, stateMachine, "dodge", dodgeStateData, this); rangeAttackState = new Slime_RangeAttackState(this, stateMachine, "rangeAttack", rangeAttackPosition, rangeAttackStateData, this); stateMachine.Initialize(moveState); }
protected override void Start() { base.Start(); IdleState = new Slime_IdleState(FiniteStateMachine, this, "idle", _idleStateData, this); JumpingMoveState = new Slime_JumpingMoveState(FiniteStateMachine, this, "jumpingMove", _jumpingMoveStateData, this); PlayerDetectedState = new Slime_PlayerDetectedState(FiniteStateMachine, this, "playerDetected", _playerDetectedStateData, this); MeleeAttackState = new Slime_MeleeAttackState(FiniteStateMachine, this, "meleeAttack", _meleeAttackPosition, _meleeAttackStateData, this); AreaAttackState = new Slime_AreaAttackState(FiniteStateMachine, this, "areaAttack", _areaAttackPosition, _areaAttackStateData, this); DamageState = new Slime_DamageState(FiniteStateMachine, this, "damage", _damageStateData, this); StunState = new Slime_StunState(FiniteStateMachine, this, "stun", _stunStateData, this); DeadState = new Slime_DeadState(FiniteStateMachine, this, "dead", _deadStateData, this); FiniteStateMachine.Initialize(IdleState); DissolveEffect = new DissolveEffect(); }