Quantcast
Channel: Answers by "jamesflowerdew"
Viewing all articles
Browse latest Browse all 61

Answer by jamesflowerdew

$
0
0
I don't do JavaScript so my grammar may be dodgy, but does this help? function OnCollisionEnter(col:Collision) { print(col.gameObject.name); var vScript: EnemyAI=col.gameObject.GetComponent(EnemyAI); if(vScript != null) { vScript.hitCheck(); } Destroy(gameObject); }

Viewing all articles
Browse latest Browse all 61

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>