Exemple #1
0
 void OnTriggerEnter(Collider other)
 {
     if (hasAuthority)
     {
         if (other.gameObject != LobbyManager.lmSingleton.client.connection.playerControllers[0].gameObject)
         {
             HealthHandler hh = other.gameObject.GetComponent <HealthHandler>();
             if (hh != null)
             {
                 hh.CmdDamage(damage);
             }
         }
         NetworkServer.Destroy(gameObject);
     }
 }