Esempio n. 1
0
 // Called when collides with a SonicPing sphere collider
 public void OnPing(PingSource pingSource, Vector3 pingOrigin) // see also https://stackoverflow.com/questions/2844899/how-to-get-global-access-to-enum-types-in-c for possible improvements
 {
     BecomeAudible();
     if (isEnemy)
     {
         // Tell the enemy component that we got pinged
         enemy.OnPing(pingSource, pingOrigin);
     }
 }
Esempio n. 2
0
 public void OnPing(PingSource pingSource, Vector3 pingOrigin)
 {
     if (pingSource == PingSource.Player)
     {
         // Detect player
         knowledgeLevel     = KnowledgeLevel.KnowsLastLocation;
         playerLastLocation = pingOrigin;
     }
 }