Quantcast
Viewing all articles
Browse latest Browse all 1488

OnCollision2DEnter Help?

Can anyone help me out. i would like to know the best was to alter the following script so that it only apply to one of my enemies instead of both. I'm trying to keep all the enemy stats, health, damage in one script rather than using two separate scripts. i need a way of alter the following OnCollisionEneter2D so that it only applies to Arial enemies. private void OnCollisionEnter2D(Collision2D _collInfo) { Player _player = _collInfo.collider.GetComponent(); if (_player != null){ _player.DamagePlayer(stats.damage); DamageEnemy(999999); }

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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