protected virtual void explode() { Explode.create(transform.position, false); if (data != null && data.value > 0) { Scrap.create(transform.position, data.value); } Destroy(gameObject); }
public void Demolish(bool explode, bool delay) { setSelected(false); if (explode) { Explode.create(transform.position, delay); } Destroy(gameObject); }