Rocket will not leave launch pad, vibrates only, will not move left or right
using UnityEngine;
using UnityEngine.SceneManager;
public class CollisionHandler: MonoBehaviour
{
void OnCollisionEnter(Collision other)
{
switch(other.gameObject.tag)
{
case "Friendly":
Debug.Log("This object will not hurt you");
break;
case "Finish":
Debug.Log("You did it!!");
break;
case "Fuel":
Debug.Log("Time to refuel");
break;
default:
ReloadLevel();
break;
}
}
void ReloadLevel()
{
SceneManager.LoadScene(0);
}
}