Exemple #1
0
 void Update()
 {
     anim.SetInteger("health", health.health);
     anim.SetInteger("ammo", ammo.ammo);
     anim.SetFloat("distanceToEnemy", botUtility.GetDistanceToClosestEnemy());
     anim.SetBool("navigating", botUtility.IsNavigating());
 }
Exemple #2
0
    public IEnumerator NavigateToEnemy()
    {
        var target = botUtility.FindClosestPlayer();

        if (botUtility.NavigateTo(target))
        {
            do
            {
                yield return(null);
            } while (botUtility.IsNavigating() && botUtility.GetDistanceToClosestEnemy() >= 10.0f);
        }
    }