Open leeanneb opened 11 years ago
Fixed Error:
function OnTriggerEnter(other:Collider) { if(other.gameObject.tag=="alien") { SpaceshipController.score++; SpaceshipController.hit++; //destroy the alien Destroy(other.gameObject); //destroy the laser Destroy(this.gameObject); } }
I added "SpaceshipController.score++;" so that the score increment when hitting an Alien
Error: function OnTriggerEnter(other:Collider) { if(other.gameObject.tag=="alien") { SpaceshipController.hit++; //destroy the alien Destroy(other.gameObject); //destroy the laser Destroy(this.gameObject); } }