Exemplo n.º 1
0
    protected override void Awake()
    {
        base.Awake();

        _enemyAI_Random         = GetComponent <EnemyAI_Random>();
        _enemyAI_Random.enabled = false;

        _enemyMove.enabled = false;
    }
Exemplo n.º 2
0
    IEnumerator Fly()
    {
        _state = State.Flying;

        _flyStartTime = Time.time;
        _flyDirection = EnforceBoundary(EnemyAI_Random.GetRandomDirectionXZ());
        _flyDuration  = BASE_FLY_DURATION + Random.Range(-FLY_DURATION_VARIANCE, FLY_DURATION_VARIANCE);

        yield return(new WaitForSeconds(_flyDuration));

        StartCoroutine("Idle");
    }
Exemplo n.º 3
0
    void Start()
    {
        _enemyMove.Mode = EnemyMove.MovementMode.DirectionOnly;
        _enemyMove.AlwaysFaceTowardsMoveDirection = false;

        MoveDirection = EnemyAI_Random.GetRandomDirectionXZ();

        if (IsHead)
        {
            CreateWormBody();
        }

        IsVulnerable = (IsHead || IsTail);
    }
Exemplo n.º 4
0
    void Start()
    {
        _enemyMove.Mode = EnemyMove.MovementMode.DirectionOnly;

        MoveDirection = EnemyAI_Random.GetRandomDirectionXZ();
    }
Exemplo n.º 5
0
 void ChangeDirection()
 {
     _moveDirection = EnemyAI_Random.GetRandomDirectionXZ();
 }