Пример #1
0
 private void OnCollisionEnter2D(Collision2D col)
 {
     if (col.gameObject.tag.ToLower().Equals("player"))
     {
         Respawn rs = col.gameObject.GetComponent <Respawn>();
         if (rs != null)
         {
             rs.Damage(damage, ERespawn.OnDamage);
         }
     }
 }
Пример #2
0
 private void Start()
 {
     DGround.listener.Add(this);
     active = this;
 }