Example #1
0
    /// <summary>
    /// For the most part, the Update function in this class acts as an AI registry.
    /// They all know to behave with one another.
    /// </summary>
    private void Update()
    {
        // These ranges drive the aggressive behavior of this robot.
        _myAIController.AITrackTarget();

        // F**k it, we're always lookin to engage. Every f****n frame.
        _myAIController.AIEngageTarget();

        // If within weapon range, fire fire fire!!
        _myAIController.AIAttackTarget();
    }
    /// <summary>
    /// For the most part, the Update function in this class acts as an AI registry.
    /// They all know to behave with one another.
    /// </summary>
    private void Update()
    {
        if (_isAIActive == true)
        {
            // Lot's of targets to chose from. Keep an eye out...
            _myAIController.AIFindClosestTarget();

            // These ranges drive the aggressive behavior of this robot.
            _myAIController.AITrackTarget();

            // Follow the leader, as they say.
            _myAIController.AIFollowPlayer();

            // If within weapon range, fire fire fire!!
            _myAIController.AIAttackTarget();
        }
    }