Created
February 25, 2017 01:09
-
-
Save WakkyFree/c23b1f4de210b667e14d38f181c62451 to your computer and use it in GitHub Desktop.
Unity script to add particle effect to walls
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
using UnityEngine; | |
using System.Collections; | |
public class WallEffect : MonoBehaviour { | |
private ParticleSystem particle; | |
public int i; | |
// Use this for initialization | |
void Start () { | |
particle = this.GetComponent<ParticleSystem>(); | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
void OnCollisionEnter(Collision collision) { | |
// if (collision.gameObject.tag == "Ball") { | |
particle.Play(); | |
// } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment