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(); }
// Use this for initialization void Start() { man = this.GetComponent <ExplosionManager>(); man.Explode(); }
private void OnCollisionEnter2D(Collision2D collision) { ExplosionManager.Explode(transform.position); Destroy(gameObject); }