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); } } }
private void Start() { DGround.listener.Add(this); active = this; }