private void enableSelectmusic() { select.enable(); music1.enable(); music2.enable(); music3.enable(); }
private void enableMusicinfo() { musicinfo.enable(); left.enable(); selectThis.enable(); right.enable(); }
/*private void OnDrag(Vector2 delta) * { * if(musicinfo.buttonShow == true) * { * if (delta.x < 0 && stage > 1) * stage--; * else if (delta.x > 0 && stage < 2) * stage++; * } * }*/ private void enableMenu() { menu.enable(); gameStart.enable(); login.enable(); exit.enable(); }
public void GameResume() { Time.timeScale = 1; pauseMenu.disable(); pauseButton.enable(); resumeButton.disable(); exitButton.disable(); sw.Start(); sound.Play(); }
public void GamePause() { Time.timeScale = 0; pauseMenu.enable(); pauseButton.disable(); resumeButton.enable(); exitButton.enable(); sw.Stop(); sound.Pause(); }
void Start() { new screenSetting().screenSet(1920); //1920*1080 pauseMenu = new UiData("picturePause"); pauseButton = new ButtonData("pause"); resumeButton = new ButtonData("resume"); exitButton = new ButtonData("exit"); pauseMenu.disable(); pauseButton.enable(); resumeButton.disable(); exitButton.disable(); sound = GameObject.Find("music").GetComponent <AudioSource>(); sound.clip = Resources.Load <AudioClip>(commonData.path + "/music/" + commonData.musicName) as AudioClip; score = GameObject.Find("score").GetComponent <Text>(); combo = GameObject.Find("combo").GetComponent <Text>(); commonData.clear(); pauseMenu.buttonShow.sprite = Resources.Load <Sprite>(commonData.path + "/sprite/background/[1280_720]pauseMenu") as Sprite; sound.Play(); switch (commonData.path[commonData.path.Length - 1]) { case '1': score.color = Color.white; combo.color = Color.white; break; case '2': score.color = Color.white; combo.color = Color.gray; break; case '3': score.color = Color.blue; combo.color = Color.blue; break; } sw = new Stopwatch(); sw.Start(); }
// Update is called once per frame void Update() { if (Input.GetKeyUp(KeyCode.Escape) || backbutton.isClicked == true) { if (menu.buttonShow.enabled == true) { UnityEngine.SceneManagement.SceneManager.LoadScene("startScreen"); } else if (select.buttonShow.enabled == true) { enableMenu(); disableSelectmusic(); disableBack(); } else { enableSelectmusic(); disableMusicinfo(); enableBack(); } } if (gameStart.isClicked == true) { disableMenu(); enableSelectmusic(); enableBack(); } else if (music1.isClicked == true) { Debug.Log("1 clicked"); stage = 1; disableSelectmusic(); enableMusicinfo(); } else if (music2.isClicked == true) { Debug.Log("2 clicked"); stage = 2; disableSelectmusic(); enableMusicinfo(); } else if (music3.isClicked == true) { stage = 3; disableSelectmusic(); enableMusicinfo(); } else if (left.isClicked == true) { if (stage != 1) { stage--; } left.enable(); } else if (right.isClicked == true) { if (stage != 3) { stage++; } right.enable(); } else if (selectThis.isClicked == true) { UnityEngine.SceneManagement.SceneManager.LoadScene("inGame"); } if (stage == 1 && stage != preStage) { preStage = stage; commonData.path = "stage/1"; musicinfo.buttonShow.sprite = Resources.Load <Sprite>("1"); } else if (stage == 2 && stage != preStage) { preStage = stage; commonData.path = "stage/2"; musicinfo.buttonShow.sprite = Resources.Load <Sprite>("2"); } else if (stage == 3 && stage != preStage) { preStage = stage; commonData.path = "stage/3"; musicinfo.buttonShow.sprite = Resources.Load <Sprite>("3"); } }
private void enableBack() { back.enable(); backbutton.enable(); }
// Start is called before the first frame update void Start() { new screenSetting().screenSet(1920); acti1 = new UiData("1000"); acti2 = new UiData("1100"); acti3 = new UiData("1110"); acti4 = new UiData("1111"); lock2 = new UiData("lock2"); lock3 = new UiData("lock3"); lock4 = new UiData("lock4"); ch1 = new ButtonData("select1"); ch2 = new ButtonData("select2"); ch3 = new ButtonData("select3"); ch4 = new ButtonData("select4"); acti1.disable(); acti2.disable(); acti3.disable(); acti4.disable(); lock2.disable(); lock3.disable(); lock4.disable(); ch1.disable(); ch2.disable(); ch3.disable(); ch4.disable(); if (commonData.Totalscore < 500) { acti1.enable(); ch1.enable(); lock2.enable(); lock3.enable(); lock4.enable(); } else if (commonData.Totalscore > 500 && commonData.Totalscore < 1000) { acti2.enable(); ch1.enable(); ch2.enable(); lock3.enable(); lock4.enable(); } else if (commonData.Totalscore > 1000 && commonData.Totalscore < 2000) { acti3.enable(); ch1.enable(); ch2.enable(); ch3.enable(); lock4.enable(); } else { acti4.enable(); ch1.enable(); ch2.enable(); ch3.enable(); ch4.enable(); } switch (commonData.character) { case "character1": t = check.transform.position; t.x = ch1.buttonEnable.gameObject.transform.position.x; check.transform.position = t; break; case "character2": t = check.transform.position; t.x = ch2.buttonEnable.gameObject.transform.position.x; check.transform.position = t; break; case "character3": t = check.transform.position; t.x = ch3.buttonEnable.gameObject.transform.position.x; check.transform.position = t; break; case "character4": t = check.transform.position; t.x = ch4.buttonEnable.gameObject.transform.position.x; check.transform.position = t; break; } score.text = "Total Score: " + commonData.Totalscore.ToString(); }