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