void AndroidBackButton() { if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.WindowsEditor) { Debug.Log("set platform"); if (Input.GetKeyDown(KeyCode.Home) || Input.GetKeyDown(KeyCode.Escape) || Input.GetKeyDown(KeyCode.Menu)) { if (settingsCanvas.active == true) { InitializedSettings(false); } else if (aboutUsCanvas.active == true) { } else { LoadingLevel.LoadLevel(LevelOnBackButton); } } } }
void Start() { load = GameObject.Find("LevelLoader").GetComponent <LoadingLevel>(); timer = GameObject.Find("TimeManager").GetComponent <Timer>(); audioManager = FindObjectOfType <AudioManager> (); }