-
-
Save alexson/937d5c798a4dfa164c1fad8b66dcd04d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
private void Update() | |
{ | |
//if (!exploded) | |
// CheckOverlapping(); | |
} | |
... | |
void FixedUpdate() | |
{ | |
Counting(); | |
} | |
... | |
public void Explode() | |
{ | |
if (!exploded) | |
{ | |
exploded = true; | |
//Debug.Log("Explode"); | |
CheckOverlapping(); | |
//Spawn effect | |
GameObject exEff = Instantiate(explosionEffect, transform.position, transform.rotation); | |
exEff.transform.position = bombRoot.transform.position; | |
exEff.transform.localScale = transform.localScale; | |
exEff.SetActive(true); | |
//Destroy this object | |
Destroy(gameObject); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment