Beispiel #1
0
 void Update()
 {
     if (Ruler == 0)
     {
         return;
     }
     if (MyKing.GetComponent <UnitBehavior>().enemiesBehind())
     {
         RunAway();
     }
     else
     {
         Normal();
     }
 }
Beispiel #2
0
    void Update()
    {
        if (Ruler == 0)
        {
            return;
        }

        if (MyKing.GetComponent <UnitBehavior>().enemiesInfront())
        {
            Charge();
        }
        else
        {
            StopCharge();
        }
    }