Esempio n. 1
0
    public static UtilityBehaviourAI Initialize(TurrelEnemy enemy)
    {
        MovementController ctr = new TurrelEnemyController(enemy);

        instance.AddController(ctr);

        return(instance);
    }
Esempio n. 2
0
    /* --------------------------------------------------------------------------------------------*/
    /* --------------------------------------------------------------------------------------------*/
    /* --------------------------------------------------------------------------------------------*/
    /* ------------------------------------ ACTIONS FUNCTIONS -------------------------------------*/
    /* --------------------------------------------------------------------------------------------*/
    /* --------------------------------------------------------------------------------------------*/
    /* --------------------------------------------------------------------------------------------*/
    public override IEnumerator Attack(MovementController ctr, UtilityAction act)
    {
        act.isStoppable = false;

        TurrelEnemyController enemy = ctr as TurrelEnemyController;
        Vector3 target = player.position + player.up * 0.5f;

        yield return(StartCoroutine(enemy.ShootAt(target)));

        act.isRunning = false;
    }