プレーヤーに当たられば、particlesystem起動する
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class effects : MonoBehaviour {
ParticleSystem ps;
void Start () {
ps = this.GetComponent<ParticleSystem>();
ps.Stop ();
}
void Update () {
}
void OnCollisionEnter(Collision col)
{
if(col.gameObject.tag == "Player")
{
ps.Play ();
}
}
}