I have created two spawners that emit enemies and I am trying to make it so that when I left click these enemies they get destroyed and even eventually play a death animation.
I tried running a Debug.Log but it’s not even picking up that I’m left clicking.
Does anyone know what I’m doing wrong? Is this not supposed to be attached to the object I’m destroying?
Here is what I have…
#pragma strict
function OnMouseDown() {
Destroy(gameObject);
Debug.Log (" Click ");
}