Ejemplo n.º 1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        if (isDead)
        {
            return;
        }

        if (visualizeFieldOFView)
        {
            fieldOfViewHelper.DrawFieldOfView();
        }
        CheckLineOfSight();
        if (!isOverridden)
        {
            if (awarenessSystem.IsAboveThreshold() && !player.IsDead)
            {
                Attack();
                InciteNearbyEnemies();
            }
            else
            {
                if (playerFollowBehaviour != null)
                {
                    playerFollowBehaviour.Reset();
                }
                Patrol();
            }
        }
    }
Ejemplo n.º 2
0
 public void Reset()
 {
     decoratedBehaviour.Reset();
     isRotating = false;
 }
 public void Reset()
 {
     decoratedBahaviour.Reset();
     nextSearchPoint = null;
 }