Exemple #1
0
 private void Explode()
 {
     if (ready)
     {
         ready = false;
         StartCoroutine(PlayAnimationAndDestroy());
         ExplosionManager.Explode(transform.position, 3, 50, power, ExplosionManager.ExplosionType.bomb);
     }
 }
 private void DoDamage()
 {
     GetComponent <SpriteRenderer>().sortingOrder = -1;
     ExplosionManager.Explode(transform.position, radius, damage, power, ExplosionManager.ExplosionType.bomb);
     Destroy();
 }
Exemple #3
0
 // Use this for initialization
 void Start()
 {
     man = this.GetComponent <ExplosionManager>();
     man.Explode();
 }
Exemple #4
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     ExplosionManager.Explode(transform.position);
     Destroy(gameObject);
 }