Exemplo n.º 1
0
 void CheckViolation()
 {
     GameObject[] Enemys = GameObject.FindGameObjectsWithTag("enemy");
     foreach (GameObject E in Enemys)
     {
         if (!E.GetComponent <NetworkIdentity>().hasAuthority)
         {
             enemy Enemy = E.GetComponent <enemy>();
             if (Enemy.PreviousPosition.Count >= 30)
             {
                 Enemy.CheckViolation();
             }
         }
     }
 }