/// <summary> /// 更新 /// </summary> public void MyUpdate(DecisionMenu decision = null) { //アクティブ待機 if (!continueImageAnimator.gameObject.activeSelf && !toTitleImageAnimator.gameObject.activeSelf) { return; } //キー入力更新 AxisKey = Input.GetAxis("Horizontal"); //右入力 if (AxisKey > KEY_INPUT_VALUE && !isKey) { AudioManager.Instance.Play(AudioManager.SE.Select); StartCoroutine(KeyResetCoroutine()); if (menu == Menu.Continue) { menu = Menu.ToTitle; currentState = toTitleImageAnimator; nonState = continueImageAnimator; } else { menu = Menu.Continue; currentState = continueImageAnimator; nonState = toTitleImageAnimator; } currentState.SetTrigger("Next"); nonState.SetTrigger("Prev"); } //左入力 else if (AxisKey < -KEY_INPUT_VALUE && !isKey) { AudioManager.Instance.Play(AudioManager.SE.Select); StartCoroutine(KeyResetCoroutine()); if (menu == Menu.Continue) { menu = Menu.ToTitle; currentState = toTitleImageAnimator; nonState = continueImageAnimator; } else { menu = Menu.Continue; currentState = continueImageAnimator; nonState = toTitleImageAnimator; } currentState.SetTrigger("Next"); nonState.SetTrigger("Prev"); } //キーリセット //if (Mathf.Abs(AxisKey) <= 0) { isKey = false; } //決定 if (Input.GetButtonDown("Fire1")) { AudioManager.Instance.Play(AudioManager.SE.Decide); StartCoroutine(DecisionMenuCoroutine()); } //コールバック関数 if (isDecision && decision != null) { decision(); } //ランキングの明滅 timeRanking.ChangeUIcolorAndFlash(); }
/// <summary> /// 更新 /// </summary> public void MyUpdate(DecisionMenu decision = null) { //キー入力更新 AxisKey = Input.GetAxis("Vertical"); //上入力 if (AxisKey > 0 && !isKey) { AudioManager.Instance.Play(AudioManager.SE.Select); StartCoroutine(KeyResetCoroutine()); if (menu == Menu.GameStart) { menu = Menu.GameEnd; currentState = EndImageAnimator; nonState = StartImageAnimator; } else if (menu == Menu.EndRoll) { menu = Menu.GameStart; currentState = StartImageAnimator; nonState = EndRollImageAnimator; } else { menu = Menu.EndRoll; currentState = EndRollImageAnimator; nonState = EndImageAnimator; } currentState.SetTrigger("Next"); nonState.SetTrigger("Prev"); } //下入力 else if (AxisKey < 0 && !isKey) { AudioManager.Instance.Play(AudioManager.SE.Select); StartCoroutine(KeyResetCoroutine()); if (menu == Menu.GameStart) { menu = Menu.EndRoll; currentState = EndRollImageAnimator; nonState = StartImageAnimator; } else if (menu == Menu.EndRoll) { menu = Menu.GameEnd; currentState = EndImageAnimator; nonState = EndRollImageAnimator; } else { menu = Menu.GameStart; currentState = StartImageAnimator; nonState = EndImageAnimator; } currentState.SetTrigger("Next"); nonState.SetTrigger("Prev"); } //キーリセット // if (Mathf.Abs(AxisKey)<=0) { isKey = false; } //決定 if (Input.GetButtonDown("Fire1")) { AudioManager.Instance.Play(AudioManager.SE.Decide); StartCoroutine(DecisionMenuCoroutine()); } //コールバック関数 if (isDecision && decision != null) { decision(); } }