Commit 61f1e514 authored by Akram's avatar Akram
Browse files

resetPlatform now places the hero on the level without reseting the scene, cat...

resetPlatform now places the hero on the level without reseting the scene, cat takes damage from falling off level, added music to level3
parent 3698b737
......@@ -3,9 +3,16 @@ using System.Collections;
public class resetPlayer : MonoBehaviour {
public GameObject check;
void Start() {
}
void OnTriggerEnter2D(Collider2D other){
if(other.CompareTag("Player")){
Application.LoadLevel(Application.loadedLevel);
other.gameObject.SendMessage("TakeEnvironmentDamage", -5);
other.gameObject.transform.position = ( new Vector3(check.transform.position.x, check.transform.position.y, check.transform.position.z));
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment