IEnumerator AnimCroutine(float waitTime) { isAnim = false; backButtonImage.SetActive(false); yield return(new WaitForSeconds(waitTime)); if (isNormal && !isHardUnlock) { hardLockImage.GetComponent <Animator>().SetBool("isAnim", true); StageDate.SetBool(StageDate.hardUnlockKey, true); yield return(new WaitForSeconds(2.4f)); DrawChange(); yield return(new WaitForSeconds(0.5f)); } if (isHard && !isExtraUnlock) { exLockImage.GetComponent <Animator>().SetBool("isAnim", true); StageDate.SetBool(StageDate.extraUnlockKey, true); yield return(new WaitForSeconds(2.4f)); DrawChange(); yield return(new WaitForSeconds(0.5f)); } backButtonImage.SetActive(true); Select(); isAnim = true; }
void Awake() { isDelete = StageDate.GetBool(StageDate.deleteKey, false); if (!isDelete) { PlayerPrefs.DeleteAll(); StageDate.SetBool(StageDate.deleteKey, true); } }
void SetBool() { isEasy = StageDate.GetBool(StageDate.easyKey, false); isNormal = StageDate.GetBool(StageDate.normalKey, false); isHard = StageDate.GetBool(StageDate.hardKey, false); isExtra = StageDate.GetBool(StageDate.extraKey, false); isExtraUnlock = StageDate.GetBool(StageDate.extraUnlockKey, false); isHardUnlock = StageDate.GetBool(StageDate.hardUnlockKey, false); }
// Start is called before the first frame update void Start() { BGM = bgm.value; SE = se.value; fade = GetComponent <Fade>(); bgm.value = StageDate.GetAudio("BGM"); se.value = StageDate.GetAudio("SE"); audio = GetComponent <AudioSource>(); selectNum = 0; Select(); }
// Start is called before the first frame update void Start() { selectNum = images.Count - 1; Select(); isPush = false; Time.timeScale = 1.0f; BGM = StageDate.GetAudio("BGM"); SE = StageDate.GetAudio("SE"); audio = GetComponent <AudioSource>(); fade = GetComponent <Fade>(); }
// Update is called once per frame void Update() { float value; if (float.TryParse(inputField.text, out value)) { if (value > maxValue) { inputField.text = preValue + ""; } else { preValue = value; } } Name(); SelectMove(); if (isInput) { SelectKey(); } if ((Input.GetKey(KeyCode.Space) || Input.GetButtonDown("Jump")) && !isPush && !isInput) { isPush = true; audio.PlayOneShot(selectSE); RankingScene.sceneNum = 0; if (selectNum == 0) { icon.gameObject.SetActive(true); for (int i = 0; i < keys.Count; i++) { keys[i].SetActive(true); } isInput = true; } else if (selectNum == 1) { StageDate.SetBool(StageDate.clearKey, true); StageClearBool(); QuickRanking.Instance.SaveRanking(nameText.text, stageName, (int)goalscore); fade.StartFadeIn(rankingName, true); } else { StageDate.SetBool(StageDate.clearKey, true); StageClearBool(); QuickRanking.Instance.SaveRanking(nameText.text, stageName, (int)goalscore); fade.StartFadeIn("Title", true); } } }
// Update is called once per frame void Update() { SelectMove(); BGM = bgm.value; SE = se.value; mixer.SetFloat("SE", SE); mixer.SetFloat("BGM", BGM); if (selectNum == 0)//BGM { float hol = Input.GetAxis("SelectMove"); if (hol < -0.5f && !isMove) { bgm.value--; StartCoroutine(ChangeCoroutine2()); } if (hol > 0.5f && !isMove) { bgm.value++; StartCoroutine(ChangeCoroutine2()); } } else if (selectNum == 1)//SE { float hol = Input.GetAxis("SelectMove"); if (hol < -0.5f && !isMove) { se.value--; StartCoroutine(ChangeCoroutine2()); } if (hol > 0.5f && !isMove) { se.value++; StartCoroutine(ChangeCoroutine2()); } } if ((Input.GetKey(KeyCode.Escape) || Input.GetButtonDown("Attack")) && !isPush) { StageDate.SetAudio(BGM, SE); fade.StartFadeIn("Title", true); isPush = true; } }
void SelectKey() { if ((Input.GetButtonDown("Jump"))) { if (icon.GetComponent <Icon>().GetText() != null) { if (icon.GetComponent <Icon>().keyObj != null) { icon.GetComponent <Icon>().keyObj.GetComponent <KeyAction>().Push(); } keyText = icon.GetComponent <Icon>().GetText(); if (keyText == "DELETE") { inputField.text = ""; keyCnt = 0; } else if (keyText == "ENTER") { if (icon.GetComponent <Icon>().keyObj != null) { icon.GetComponent <Icon>().keyObj.GetComponent <KeyAction>().Reset(); } keyCnt = 0; for (int i = 0; i < keys.Count; i++) { keys[i].SetActive(false); } icon.gameObject.SetActive(false); StageDate.SetBool(StageDate.clearKey, true); StageClearBool(); QuickRanking.Instance.SaveRanking(nameText.text, stageName, (int)goalscore); fade.StartFadeIn(rankingName, true); } else { if (keyCnt <= maxValue) { inputField.text += keyText; keyCnt++; } } } } }
public void Delete() { if (pushCnt == 0) { PlayerPrefs.DeleteAll(); } else if (pushCnt == 1) { StageDate.SetBool(StageDate.clearKey, true); StageDate.SetBool(StageDate.normalKey, true); } else if (pushCnt == 2) { StageDate.SetBool(StageDate.hardKey, true); } else { StageDate.SetBool(StageDate.extraKey, true); } pushCnt += 1; }
void StageClearBool() { StageDate.Instance.SetSceneName(stageName); if (stageName == "StageEasy") { StageDate.SetBool(StageDate.easyKey, true); rankingName = "RankingEasy"; } else if (stageName == "StageNormal") { StageDate.SetBool(StageDate.normalKey, true); rankingName = "RankingNormal"; } else if (stageName == "StageHard") { StageDate.SetBool(StageDate.hardKey, true); rankingName = "RankingHard"; } else { StageDate.SetBool(StageDate.extraKey, true); rankingName = "RankingExtra"; } }
// Update is called once per frame void Update() { status = StageDate.GetBool(StageDate.clearKey, false); FreezImage(); SelectMove(); mixer.SetFloat("SE", SE); mixer.SetFloat("BGM", BGM); if ((Input.GetKey(KeyCode.Space) || Input.GetButtonDown("Jump")) && !isPush) { isPush = true; audio.PlayOneShot(selectSE); if (selectNum == 0) { Quit(); } else if (selectNum == 1) { fade.StartFadeIn("Option", true); } else if (selectNum == 2) { if (status) { fade.StartFadeIn("RankingSelect", true); } else { isPush = false; } } else { fade.StartFadeIn("StageSelect", true); } } }