protected override void Awake()
    {
        base.Awake();

        enemyIdleState           = new E1_IdleState(this, enemyData, "idle", this);
        enemyMoveState           = new E1_MoveState(this, enemyData, "move", this);
        enemyPlayerDetectedState = new E1_PlayerDetectedState(this, enemyData, "playerDetected", this);
        enemyChargeState         = new E1_ChargeState(this, enemyData, "charge", this);
        enemyLookForPlayerState  = new E1_LookForPlayerState(this, enemyData, "lookForPlayer", this);
        enemyMelleAttackState    = new E1_MeleeAttackState(this, enemyData, "shortAction", this, meleeAttack);
        enemyStunState           = new E1_StunState(this, enemyData, "stun", this);
        enemyAttackedState       = new E1_AttackedState(this, enemyData, "attacked", this);
        enemyDeathState          = new E1_DeathState(this, enemyData, "die", this);
    }
Ejemplo n.º 2
0
    public override void Start()
    {
        base.Start();

        moveState           = new E1_MoveState(this, stateMachine, "move", moveStateData, this);
        idleState           = new E1_IdleState(this, stateMachine, "idle", idleStateData, this);
        playerDetectedState = new E1_PlayerDetectedState(this, stateMachine, "playerDetected", playerDetectedData, this);
        chargeState         = new E1_ChargeState(this, stateMachine, "charge", chargeStateData, this);
        lookForPlayerState  = new E1_LookForPlayerState(this, stateMachine, "lookForPlayer", LookForPlayerStateData, this);
        meleeAttackState    = new E1_MeleeAttackState(this, stateMachine, "meleeAttack", meleeAttackPosition, meleeAttackStateData, this);
        stunState           = new E1_StunState(this, stateMachine, "stun", stunStateData, this);
        deathState          = new E1_DeathState(this, stateMachine, "dead", deathStateData, this);

        stateMachine.Initialize(moveState);
    }