Commit 1bba5620 authored by Hugo Rivera's avatar Hugo Rivera

Add bomb script.

parent 70bf29ff
using UnityEngine;
using System.Collections;
public class BombCollision : MonoBehaviour
{
ParticleSystem particles;
void Start()
{
particles = GetComponent<ParticleSystem>();
particles.Pause();
particles.Clear();
}
void OnCollisionEnter(Collision col)
{
particles.Emit(100);
particles.Play();
Destroy(gameObject, 0.5f);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment