コード例 #1
0
    protected override void Start()
    {
        base.Start();

        idleState           = new Boar_IdleState(finiteStateMachine, this, "idle", idleStateData, this);
        moveState           = new Boar_MoveState(finiteStateMachine, this, "move", moveStateData, this);
        playerDetectedState = new Boar_PlayerDetectedState(finiteStateMachine, this, "playerDetected", playerDetectedStateData, this);
        chargeState         = new Boar_ChargeState(finiteStateMachine, this, "charge", chargeStateData, this);
        lookForPlayerState  = new Boar_LookForPlayerState(finiteStateMachine, this, "lookForPlayer", lookForPlayerStateData, this);
        slowDownState       = new Boar_SlowDownState(finiteStateMachine, this, "slowDown", slowDownStateData, this);
        meleeAttackState    = new Boar_MeleeAttackState(finiteStateMachine, this, "meleeAttack", meleeAttackPosition, meleeAttackStateData, this);
        stunState           = new Boar_StunState(finiteStateMachine, this, "stun", stunStateData, this);
        deadState           = new Boar_DeadState(finiteStateMachine, this, "dead", deadStateData, this);

        finiteStateMachine.Initialize(moveState);
    }
コード例 #2
0
ファイル: Boar.cs プロジェクト: NowakArtur97/Ars-Moriendi
    protected override void Start()
    {
        base.Start();

        IdleState           = new Boar_IdleState(FiniteStateMachine, this, "idle", _idleStateData, this);
        MoveState           = new Boar_MoveState(FiniteStateMachine, this, "move", _moveStateData, this);
        PlayerDetectedState = new Boar_PlayerDetectedState(FiniteStateMachine, this, "playerDetected", _playerDetectedStateData, this);
        ChargeState         = new Boar_ChargeState(FiniteStateMachine, this, "charge", _chargeStateData, this);
        LookForPlayerState  = new Boar_LookForPlayerState(FiniteStateMachine, this, "lookForPlayer", _lookForPlayerStateData, this);
        SlowDownState       = new Boar_SlowDownState(FiniteStateMachine, this, "slowDown", _slowDownStateData, this);
        MeleeAttackState    = new Boar_MeleeAttackState(FiniteStateMachine, this, "meleeAttack", _meleeAttackPosition, _meleeAttackStateData, this);
        DamageState         = new Boar_DamageState(FiniteStateMachine, this, "damage", _damageStateData, this);
        StunState           = new Boar_StunState(FiniteStateMachine, this, "stun", _stunStateData, this);
        DeadState           = new Boar_DeadState(FiniteStateMachine, this, "dead", _deadStateData, this);

        FiniteStateMachine.Initialize(MoveState);

        DissolveEffect = new DissolveEffect();
    }