public void Play() { OtherMove playscript = Player.GetComponent <OtherMove> (); playscript.enabled = true; Application.LoadLevel(0); Time.timeScale = 1; }
public void Continuegame() { OtherMove playscript = Player.GetComponent <OtherMove> (); playscript.enabled = true; Continue.SetActive(false); Restart.SetActive(false); Menu.SetActive(false); Time.timeScale = 1; }
public void InputChoice() { OtherMove playscript = playeracc.GetComponent <OtherMove> (); if (choicetext.text == "Accelerometer") { choicetext.text = "Touch"; PlayerPrefs.SetInt("accel", 0); } else { choicetext.text = "Accelerometer"; PlayerPrefs.SetInt("accel", 1); } }
// Update is called once per frame void Update() { //slidevalue1 = GameObject.Find ("SensitivitySlider").GetComponent<Slider> ().value; if (Application.loadedLevel == 0 && GetComponent <UIMat>().play == true && Player.activeSelf == true) { if (Input.GetKey(KeyCode.Escape)) { Time.timeScale = 0; OtherMove playscript = Player.GetComponent <OtherMove> (); playscript.enabled = false; Continue.SetActive(true); Restart.SetActive(true); Menu.SetActive(true); } } /*score1 += Time.deltaTime; * scoreacc = Mathf.FloorToInt (score1); * /*score1 = 0; * score1 += Mathf.FloorToInt(Time.timeSinceLevelLoad); * scoreacc += score1;*/ /*timedisp = scoreacc.ToString (); * score.text = "Score: " + timedisp;*/ }