|
Post by xenoblackinc on Jan 1, 2017 3:06:09 GMT
how would i make my enemy disappear when they die or have a paricle effect where they fade or disintegrate
|
|
|
Post by Chronicman on Jan 1, 2017 5:48:07 GMT
Id create a new script and trigger it when the AI dies via the vOnDeathEvent.
using UnityEngine; using System.Collections;
public class DestoryAI : MonoBehaviour { public float DestroyTime = 5; void OnDeath() { StartCoroutine(Death()); } IEnumerator Death() { yield return new WaitForSeconds(DestroyTime); Destroy(gameObject); } }
|
|