//detonate the dynamite
 public void detonate()
 {
     endTurn.Ass();
     Instantiate(circle, this.transform.position, Quaternion.identity);
     ui.createExplosion(this.transform);
     Destroy(gameObject);
 }
示例#2
0
    //If the projectile collides with something...\\
    private void OnTriggerEnter2D(Collider2D other)
    {
        endTurn.Ass();
        //If the object is the ground.\\
        if (other.gameObject.CompareTag(Tags.ground))
        {
            //Let the levelDestroyer do it's stuff.\\
            levelDestroyer.groundHit();

            ui.createExplosion(transform);
        }
    }