hi all professional scripters,
let me explain whats going on
-
i created a TD game. And i wanted my game switch to next level when my last enemy collide with the cannon(projectile) shot by my towers.
-
below are the script i used to attach to the last enemy
var myLevel : String;
function OnCollisionEnter (myCollision : Collision) {
if(myCollision.gameObject.name == "cannon(Clone)"){
// i tried cannon instead of cannon(Clone) as well.
Application.LoadLevel(1);
}
}
your help will be much appreciated. Thanks for your time