Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (beforeInput)
     {
         if (!Input.anyKey)
         {
             beforeInput = false;
         }
     }
     else
     {
         if (Input.anyKey)
         {
             beforeInput = true;
             spriteNum++;
             if (spriteNum >= list.Count)
             {
                 //ゲーム開始
                 sceneChange.ChangeScene();
             }
             else
             {
                 image.sprite = list[spriteNum];
             }
         }
     }
 }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (EndGame.GetEndGame())
     {
         sceneChange.ChangeScene();
     }
 }
Exemplo n.º 3
0
 public void InGameChange()
 {
     if (waveRecog.minFreq < waveRecog.maxFreq)
     {
         jsonProcess.FreqChange(waveRecog.minFreq, waveRecog.maxFreq);
     }
     StartCoroutine(SceneChange.ChangeScene("StageSelection"));
 }
Exemplo n.º 4
0
 // Update is called once per frame
 void Update()
 {
     // プレイヤーが死んだとき
     if (player.GetDieFlag())
     {
         sceneChange.ChangeScene();
     }
 }
Exemplo n.º 5
0
        protected virtual void Awake()
        {
            GameState.HasBooted = true;

            DontDestroyOnLoad(persistent);

            SceneChange.ChangeScene(buildIndexNext);
        }
Exemplo n.º 6
0
 // Update is called once per frame
 void Update()
 {
     if (Input.anyKey)
     {
         if (sceneChange != null)
         {
             sceneChange.ChangeScene();
         }
     }
 }
 public void Continue()
 {
     if (readyToStart)
     {
         sceneChange.ChangeScene();
     }
     else
     {
         message.text = "Input the number of bees";
     }
 }
Exemplo n.º 8
0
 public void Return()
 {
     SeManager.Instance.PushedButton();
     if (Configs.Instance.charaSelect)
     {
         SceneChange.ChangeScene(PLAYERSELECT);
     }
     else
     {
         SceneChange.ChangeScene(TITLE);
     }
 }
Exemplo n.º 9
0
 void SkyButton()
 {
     if (Input.GetKeyDown("joystick button 0"))
     {
         skyButton.SetTrigger("play");
         sceneChange.ChangeScene("ScenarioScene");
         rageButton.SetTrigger("notPlay");
         uniButton.SetTrigger("notPlay");
     }
     if (Input.GetAxis("Horizontal2") <= -inputNum)
     {
         skyButton.SetBool("select", false);
         uniButton.SetBool("select", true);
         inputed = true;
     }
     else if (Input.GetAxis("Horizontal2") >= inputNum)
     {
         skyButton.SetBool("select", false);
         rageButton.SetBool("select", true);
         inputed = true;
     }
 }
Exemplo n.º 10
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Return))
     {
         //名前入力ボタンが登場したら
         if (placeHolder.color.a >= 0.5f)
         {
             SaveRanking(totalScore, inputField.GetComponent <InputField>().text, datapath);
             Destroy(inputField.gameObject);
             StartCoroutine(SceneChange.ChangeScene("Title"));
         }
     }
 }
Exemplo n.º 11
0
    IEnumerator wait(int s)
    {
        if (s == 3)
        {
            UICanvas.enabled = false;
        }
        yield return(new WaitForSeconds(s));

        if (s == 7)
        {
            UICanvas.enabled = true;
        }
        if (s == 3)
        {
            SceneChange.ChangeScene("main");
        }
    }
Exemplo n.º 12
0
    void Update()
    {
        if (Input.GetButtonDown("Horizontal") && inputtable)
        {
            audioSource.PlayOneShot(se[0]);
            prevSelect = select;
            select    += (int)Input.GetAxisRaw("Horizontal");
            StopCoroutine("MoveUfo");
            if (select < 0)
            {
                select = 0;
            }
            else if (stageCount <= select)
            {
                select = stageCount - 1;
            }
            else
            {
                StartCoroutine("MoveUfo");
                StopCoroutine("Explain");
                StartCoroutine("Explain");
            }
        }
        if (isAfterSelection)
        {
            ufoT.position += Vector3.up * 0.2f;
        }
        else
        {
            ufoT.transform.LookAt(cameraT.transform.position);
            ufoT.GetChild(0).position += Vector3.up * Mathf.Sin(Time.time * 350 * Mathf.Deg2Rad) * 0.07f;
        }
        explainObj.transform.position += (Vector3.up + Vector3.right * 0.5f) * Mathf.Sin(Time.time * 420 * Mathf.Deg2Rad) * 0.02f;
        message.transform.position    += (Vector3.up) * Mathf.Sin(Time.time * 330 * Mathf.Deg2Rad) * 0.01f;

        if ((Input.GetKeyDown(KeyCode.Z) || (Input.GetKeyDown(KeyCode.Return))) && inputtable && stagePoint[select].CanGo)
        {
            audioSource.PlayOneShot(se[2]);
            isAfterSelection = true;
            Debug.Log(stagePoint[select].StageName);
            StartCoroutine(SceneChange.ChangeScene(stagePoint[select].StageName));
            //else SE
        }
    }
Exemplo n.º 13
0
    IEnumerator EnableYesNo()
    {
        bool afterSelect = false;

        selectYesNo = true;
        StartCoroutine("MoveCursor", cursorPos_yesNo[(bool)selectYesNo ? 0 : 1].position);
        StartCoroutine(ShowYesNoMessage());
        for (int i = 0; i < 2; i++)
        {
            StartCoroutine(FadeInText(yesNo[i], defYesNoColor, 5));
        }
        yield return(new WaitForSeconds(0.2f));

        while (true)
        {
            if ((Input.GetButtonDown("Horizontal") || Input.GetButtonDown("Vertical")) && !afterSelect)
            {
                audioSource.PlayOneShot(se[0]);
                selectYesNo = !selectYesNo;
                StopCoroutine("MoveCursor");
                StartCoroutine("MoveCursor", cursorPos_yesNo[(bool)selectYesNo ? 0 : 1].position);
            }
            if ((Input.GetKeyDown(KeyCode.Z) || (Input.GetKeyDown(KeyCode.Return))) && !afterSelect)
            {
                audioSource.PlayOneShot(se[1]);
                if ((bool)selectYesNo)
                {
                    StartCoroutine(SceneChange.ChangeScene("Frequency"));
                }
                else
                {
                    StartCoroutine(SceneChange.ChangeScene("StageSelection"));
                }
                afterSelect = true;
            }
            AnimateYesNo();

            yield return(null);
        }
    }
Exemplo n.º 14
0
 private void Update()
 {
     //タイトルに戻る
     if (Input.GetKeyDown(KeyCode.T))
     {
         //名前登録シーンでなければ
         if (this.state != State.Score)
         {
             StartCoroutine(SceneChange.ChangeScene("Title"));
         }
     }
     //ステージの先頭に戻る(スコア・タイム・中間ポイントリセット)
     else if (Input.GetKeyDown(KeyCode.R))
     {
         //ゲームシーンであれば
         if (SceneManager.GetActiveScene().name.Contains("Game"))
         {
             isReload = true;
             RespawnManager.Instance.isRespawn = false;
             StartCoroutine(SceneChange.ChangeScene(SceneManager.GetActiveScene().name));
         }
     }
 }
Exemplo n.º 15
0
        void UpdateLevel(object sender, EventArgs e)
        {
            bool success;

            success = GameState.Machine.TryGetPresentState(out Level level);
            if (!success)
            {
                return;
            }

            success = TryGetValue(level, out int buildIndex);
            if (!success)
            {
                return;
            }

            if (success)
            {
                Debug.LogFormat("Go to level {0} (index {1})", level, buildIndex);
            }

            SceneChange.ChangeScene(buildIndex);
        }
Exemplo n.º 16
0
    IEnumerator AbsorbPlayer(Transform player)
    {
        StartCoroutine(Sound());
        cleared = true;
        float   t        = 0;
        Vector3 defPos   = player.position;
        Vector3 defScale = player.localScale;

        while (t <= 1f)
        {
            player.position   = Vector3.Lerp(defPos, transform.position, t);
            player.localScale = Vector3.Lerp(defScale, Vector3.zero, t);
            t += Time.deltaTime;
            yield return(null);
        }
        t = 0;
        yield return(new WaitForSeconds(0.3f));

        while (t <= 1)
        {
            clear_UI.color = Color.Lerp(Color.white - Color.black, Color.white, t);
            clear_UI.rectTransform.localScale = Vector3.Lerp(Vector3.one * 1.3f, Vector3.one, t);
            t += Time.deltaTime * 2f;
            yield return(null);
        }
        t = 0;
        while (t <= 1)
        {
            clear_UI_Effect.color = Color.Lerp(Color.white, Color.white - Color.black, t);
            clear_UI_Effect.rectTransform.localScale = Vector3.Lerp(Vector3.one, Vector3.one * 2f, t);
            t += Time.deltaTime * 1f;
            yield return(null);
        }
        yield return(new WaitForSeconds(1.5f));

        StartCoroutine(SceneChange.ChangeScene("ScoreTest"));
    }
Exemplo n.º 17
0
    public IEnumerator Die()
    {
        Dead        = true;
        canControll = false;
        float time = 0;

        while (true)
        {
            stageController.isMoving = false;
            time += Time.deltaTime / 2f;
            //このコルーチンは時間切れや落下などいろいろなところで呼ばれているので
            //排他処理をする
            if (gameOver != null)
            {
                gameOver.color = (Color.white * time);
                if (time >= 1)
                {
                    StartCoroutine(SceneChange.ChangeScene(SceneManager.GetActiveScene().name));
                    yield break;
                }
            }
            yield return(null);
        }
    }
Exemplo n.º 18
0
 /// <summary>
 /// シーンを切り替わる
 /// </summary>
 /// <param name="nextScene">次のシーン</param>
 public void ChangeScene(EScene nextScene)
 {
     sceneManager.ChangeScene(nextScene);                //シーンChange
 }
Exemplo n.º 19
0
 void HandleDeath(object sender, EventArgs e)
 {
     SceneChange.ChangeScene(2);
 }
Exemplo n.º 20
0
 public void BackSelect()
 {
     Save();
     SceneChange.ChangeScene("Select");
 }
Exemplo n.º 21
0
 public void BackTItle()
 {
     Save();
     SceneChange.ChangeScene("Title");
 }
Exemplo n.º 22
0
        public void Play()
        {
            InitializeGameState();

            SceneChange.ChangeScene(3);
        }
Exemplo n.º 23
0
 public void BackTitle()
 {
     SeManager.Instance.PushedButton();
     SceneChange.ChangeScene("Title");
 }
Exemplo n.º 24
0
    IEnumerator RankAnimation()
    {
        aud.volume = 0.5f;
        aud.clip   = se[0];
        yield return(new WaitForSeconds(1));

        StartCoroutine(Sound());
        while (preScore > subPerFrameScore - 1)
        {
            preScore           -= subPerFrameScore;
            totalScore         += subPerFrameScore;
            preScoreText.text   = preScore.ToString();
            totalScoreText.text = totalScore.ToString();
            yield return(new WaitForSeconds(0.01f));
        }
        totalScore         += preScore;
        preScore            = 0;
        preScoreText.text   = preScore.ToString();
        totalScoreText.text = totalScore.ToString();

        while (remainingTime > subPerFrameTime - 1)
        {
            if (remainingTime <= 0)
            {
                break;
            }

            remainingTime -= subPerFrameTime;
            totalScore    += subPerFrameTime;

            timeText.text       = remainingTime.ToString();
            totalScoreText.text = totalScore.ToString();

            yield return(new WaitForSeconds(0.01f));
        }
        countingIsOver      = true;
        totalScore         += remainingTime;
        remainingTime       = 0;
        timeText.text       = remainingTime.ToString();
        totalScoreText.text = totalScore.ToString();
        while (totalScoreButton.localPosition.y > lastTotalScorePostion.y)
        {
            //TotalScoreのUIを移動させる
            totalScoreButton.localPosition = Vector3.Lerp(totalScoreButton.localPosition, lastTotalScorePostion, Time.deltaTime * 5);
            totalScoreButton.localScale   *= 1.007f;
            if (totalScoreButton.localScale.x > 1.4f)
            {
                break;
            }
            yield return(null);
        }
        while (scoreButtonImage.color.a > 0)
        {
            scoreButtonImage.color -= Color.black * 0.05f;
            timeButtonImage.color  -= Color.black * 0.05f;
            timeT.color            -= Color.black * 0.05f;
            scoreT.color           -= Color.black * 0.05f;
            preScoreText.color     -= Color.black * 0.05f;
            timeText.color         -= Color.black * 0.05f;
            yield return(null);
        }

        var rank = Return_Rankin(datapath, totalScore);

        if (rank == -1)
        {
            rankText.text = "ランクインならず...";
        }
        else
        {
            rankText.text = string.Format("第{0}位", rank).ToString();
        }
        while (rankText.color.a < 1)
        {
            rankText.color += Color.black * 0.05f;
            yield return(null);
        }
        if (rank == -1)
        {
            StartCoroutine(SceneChange.ChangeScene("Title"));
            yield break;
        }

        while (inputField.color.a < 1)
        {
            inputField.color += Color.black * 0.1f;
            yield return(null);
        }

        while (placeHolder.color.a < 0.5f)
        {
            placeHolder.color += Color.black * 0.1f;
            yield return(null);
        }
        yield break;
    }
Exemplo n.º 25
0
 public void LoadScene()
 {
     StartCoroutine(SceneChange.ChangeScene(SceneManager.GetActiveScene().name));
 }