Exemple #1
0
 //called if a collidable object triggers the volume
 void OnTriggerEnter(Collider collider)
 {
     if (m_enabled)
     {
         CEntityPlayer player = collider.gameObject.GetComponent <CEntityPlayer>();
         if (player)
         {
             player.DoDamage(Damage);
             m_timeDamaged = Time.time;
         }
     }
 }