Skip to content

Instantly share code, notes, and snippets.

Created August 10, 2016 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/a0304bca33b74b2cdd92dde1a9d5e5b1 to your computer and use it in GitHub Desktop.
Save anonymous/a0304bca33b74b2cdd92dde1a9d5e5b1 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
public class LevelManager : MonoBehaviour {
public void LoadLevel (string name ){
Debug.Log("Level Load requested for :" +name);
Application.LoadLevel(name);
}
public void QuitRequest () {
Debug.Log("I want to quit");
Application.Quit ();
}
public void BackRequest (string name) {
Debug.Log("I want to back to the start scene" +name);
Application.LoadLevel(name);
}
public void LoadNextLevel() {
Application.LoadLevel(Application.loadedLevel+1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment