I want a help in animation (i already made topic there but didnt get enough help), i have a game which objects fall and player should catch them by box trigger, so when spawner fell a Bomb in Box trigger , i want to make a BOOM animation , but i dont know where to put the script and what will the script going to be and how ? i already made a trigger for the box , and when the bomb hit that trigger it gives -5 to the score , and it works fine, but i still want to add animation so when the bomb hit that trigger it make BooM animation , and i also have animation for the bomb fuze which is flash , so i dont know if i have to add Boom Animation for the same bomb or the animation should be alone , this is my code for the Box trigger :
public class DestroyObjectAndAddPoint : MonoBehaviour {
int Score=0;
int score_Bomb=0;
public TextMesh scoreText;
void OnTriggerEnter2D(Collider2D collisionObject){
Destroy (collisionObject.gameObject);
Bomb scoreBomb = collisionObject.GetComponent<Bomb> ();
if (scoreBomb != null) {
score_Bomb = score_Bomb + scoreBomb.scoreBomb1;
}
Score =score_Bomb;
scoreText.text= "Score: " + Score;
}
}
and this for the Bomb :
public class Bomb : MonoBehaviour {
public int scoreBomb1 = -5;
}
wish you help me very soon