Beispiel #1
0
    public override void Start()
    {
        base.Start();

        moveState           = new E1_MoveState(stateMachine, this, "move", moveStateData, this);
        idleState           = new E1_IdleState(stateMachine, this, "idle", idleStateData, this);
        playerDetectedState = new E1_PlayerDetectedState(stateMachine, this, "playerDetected", playerDetectedData, this);
        chargeState         = new E1_ChargeState(stateMachine, this, "charge", chargeStateData, this);
        lookForPlayerState  = new E1_LookForPlayerState(stateMachine, this, "lookForPlayer", lookForPlayerData, this);
        meleeAttackState    = new E1_MeleeAttackState(stateMachine, this, "meleeAttack", meleeAttackPosition, meleeAttackStateData, this);
        stunState           = new E1_StunState(stateMachine, this, "stun", stunStateData, this);
        deadState           = new E1_DeadState(stateMachine, this, "dead", deadStateData, this);
        stateMachine.Initialize(moveState);
    }
Beispiel #2
0
    protected override void Start()
    {
        base.Start();
        idleState          = new E1_IdleState(stateMachine, this, "idle", idleStateData, this);
        walkState          = new E1_WalkState(stateMachine, this, "walk", walkStateData, this);
        chargeState        = new E1_ChargeState(stateMachine, this, "charge", chargetStateData, this);
        detectPlayerState  = new E1_DetectPlayerState(stateMachine, this, "detectPlayer", detectPlayerStateData, this);
        lookForPlayerState = new E1_LookForPlayerState(stateMachine, this, "lookForPlayer", lookForPlayerStateData, this);
        meleeAttackState   = new E1_MeleeAttackState(stateMachine, this, "meleeAttack", meleeAttackStateData, hitBoxPoint, this);
        stunState          = new E1_StunState(stateMachine, this, "stun", stunStateData, this);
        deadState          = new E1_DeadState(stateMachine, this, "dead", deadStateData, this);

        stateMachine.Initialize(walkState);
    }