Exemplo n.º 1
0
        void Update()
        {
            if (Input.GetAxis("BottomBlue") == 1)
            {
                SoundMgr.StopBgm();
                var menuSelector = GetComponent <MSMM.MenuSelector>();
                STG.SelectedGameModeSTG.SetMode(0);
                trans.GetComponent <MSMM.Transition>().LoadScene("InvaderMain");
                menuSelector.Reset();
            }

            if (Input.GetAxis("BottomYellow") == 1)
            {
                SoundMgr.StopBgm();
                var menuSelector = GetComponent <MSMM.MenuSelector>();
                STG.SelectedGameModeSTG.SetMode(0);
                trans.GetComponent <MSMM.Transition>().LoadScene("MainTitle");
                menuSelector.Reset();
            }


            if (Input.GetAxis("Option") == 1 && Input.GetAxis("Pause") == 1)
            {
                SoundMgr.StopBgm();
            }
        }
Exemplo n.º 2
0
    //スタートのカウント
    IEnumerator Count()
    {
        GameStartText.text  = "Standby";
        GameStartText2.text = "Standby";
        yield return(new WaitForSeconds(1.0f));

        GameStartText.text  = "3";
        GameStartText2.text = "3";
        SoundMgr.PlaySe("Count_3,2,1", 0);
        yield return(new WaitForSeconds(1.0f));

        GameStartText.text  = "2";
        GameStartText2.text = "2";
        SoundMgr.PlaySe("Count_3,2,1", 0);
        yield return(new WaitForSeconds(1.0f));

        GameStartText.text  = "1";
        GameStartText2.text = "1";
        SoundMgr.PlaySe("Count_3,2,1", 0);
        yield return(new WaitForSeconds(1.0f));

        GameStartText.text  = "GAME START";
        GameStartText2.text = "GAME START";
        SoundMgr.PlayBgm("img_Title2");
        yield return(new WaitForSeconds(1.0f));

        GameStartText.gameObject.SetActive(false);

        yield return(new WaitForSeconds(48.0f));

        SoundMgr.StopBgm();

        yield return(new WaitForSeconds(6.0f));

        SoundMgr.PlaySe("BossAlert", 6);
        yield return(new WaitForSeconds(1.25f));

        SoundMgr.PlaySe("BossAlert", 6);
        yield return(new WaitForSeconds(1.25f));

        SoundMgr.PlaySe("BossAlert", 6);
        yield return(new WaitForSeconds(1.25f));

        yield return(new WaitForSeconds(0.0f));

        SoundMgr.PlayBgm("Boss00");

        yield return(new WaitForSeconds(60.0f));

        SoundMgr.PlaySe("TimeOver_A", 8);
    }
Exemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetAxis("BottomGreen") == 1)
     {
         SoundMgr.PlaySe("Push");
         SceneManager.LoadScene("InvaderTitle");
         SoundMgr.StopBgm();
     }
     if (Input.GetAxis("BottomRed") == 1)
     {
         SoundMgr.PlaySe("Push");
         SceneManager.LoadScene("MainTitle");
         SoundMgr.StopBgm();
     }
 }
Exemplo n.º 4
0
        void Update()
        {
            if (Input.GetAxis("BottomRed") == 1 || Input.GetAxis("BottomGreen") == 1 || Input.GetAxis("BottomBlue") == 1 || Input.GetAxis("BottomYellow") == 1)
            {
                var menuSelector = GetComponent <MSMM.MenuSelector>();
                STG.SelectedGameModeSTG.SetMode(0);
                trans.GetComponent <MSMM.Transition>().LoadScene("InvaderRule");
                SoundMgr.PlaySe("Start", 6);
                menuSelector.Reset();
            }

            if (Input.GetAxis("Option") == 1 && Input.GetAxis("Pause") == 1)
            {
                SoundMgr.StopBgm();
            }
        }
Exemplo n.º 5
0
 void Update()
 {
     if (Input.GetAxis("BottomGreen") == 1)
     {
         var menuSelector = GetComponent <MSMM.MenuSelector>();
         var index        = menuSelector.GetCurrentSelectedIndex();
         if (index == 0)
         {
             SoundMgr.PlaySe("UDCDecide");
             trans.GetComponent <MSMM.Transition>().LoadScene("UDCTitle");
             menuSelector.Reset();
         }
         else if (index == 1)
         {
             SoundMgr.PlaySe("UDCDecide");
             trans.GetComponent <MSMM.Transition>().LoadScene("MainTitle");
             SoundMgr.StopBgm();
             menuSelector.Reset();
         }
     }
 }
Exemplo n.º 6
0
        void Update()
        {
            if (STGPlayer.isDead || GameTime.isTimeUp || STGBoss.isDead)
            {
                SoundMgr.StopBgm();
                active += Time.deltaTime;
                if (active >= activeTime)
                {
                    active = 0;
                    var menuSelector = GetComponent <MSMM.MenuSelector>();
                    STG.SelectedGameModeSTG.SetMode(0);
                    SceneManager.LoadScene("InvaderResult");
                    SoundMgr.StopBgm();
                }
            }

            if (Input.GetAxis("Option") == 1 && Input.GetAxis("Pause") == 1)
            {
                SoundMgr.StopBgm();
            }
        }
Exemplo n.º 7
0
        void Update()
        {
            if (Input.GetAxis("Option") == 1 && Input.GetAxis("Pause") == 1)
            {
                var menuObj = GameObject.FindGameObjectsWithTag("Menu Selector");
                if (menuObj != null)
                {
                    foreach (var obj in menuObj)
                    {
                        obj.GetComponent <MSMM.MenuSelector>().Reset();
                    }
                }

                var UDC_GM_Obj = GameObject.FindGameObjectWithTag("UDC Game Manager");
                if (UDC_GM_Obj != null)
                {
                    UDC_GM_Obj.GetComponent <UDCommand.GameManager>().Reset();
                }

                if (SceneManager.GetActiveScene().name.Contains("UDC"))
                {
                    SoundMgr.StopBgm();
                }

                var STG_GM_Obj = GameObject.FindGameObjectWithTag("STG Scene Switcher");
                if (STG_GM_Obj != null)
                {
                    STG_GM_Obj.GetComponent <GameMgr>().Disable();
                }

                if (SceneManager.GetActiveScene().name.Contains("STG Scene Switcher"))
                {
                    SoundMgr.StopBgm();
                }

                SceneManager.LoadScene("MainTitle");
            }
        }
Exemplo n.º 8
0
        void Update()
        {
            if (!init)
            {
                Init();
            }
            if (!isPaused)
            {
                if (onStandby)
                {
                    standbyCanvas.SetActive(true);
                }
                UpdateDisplayTime();
                UpdateScoreText();
                if (currentCommand == 0 && (currentCommand != previousFrameCommand))
                {
                    GenerateRandomCommands();
                }
                UpdateCommandIcons(currentCommand);
                previousFrameCommand = currentCommand;
                if (Input.GetAxis("Pause") == 0)
                {
                    isPauseReleased = true;
                }
                if ((Input.GetAxis("Pause") == 1) && isPauseReleased)
                {
                    isPaused = true;
                    standbyCanvasLastState = standbyCanvas.activeSelf;
                    standbyCanvas.GetComponent <MSMM.MenuSelector>().Reset();
                    standbyCanvas.SetActive(false);
                    pauseCanvas.SetActive(true);
                    pauseCanvas.GetComponent <PauseMenu>().SetButtonState();
                }
                if (!onStandby && !gameEnded)
                {
                    if (waitingAnimation)
                    {
                        var radish = commandObjects[currentCommand].GetComponent <CommandManager>().GetRadish();
                        if (waitingTime >= 0.167f && !missSEPlayed)
                        {
                            SoundMgr.PlayVolSe("UDCMissCommand", 1.0f, 3);
                            missSEPlayed = true;
                        }
                        if (radish.GetComponent <RectTransform>().anchoredPosition.y >= 150)
                        {
                            GenerateRandomCommands();
                            currentCommand   = 0;
                            waitingAnimation = false;
                        }
                        waitingTime += Time.deltaTime;
                    }
                    else
                    {
                        CheckGamepadInput();
                        ResetCurrentCommand();
                    }
                    currentWaitTime -= Time.deltaTime;
                }
            }
            if (isPaused)
            {
                if (!pauseCanvas.activeSelf)
                {
                    isPaused        = false;
                    isPauseReleased = false;
                    standbyCanvas.SetActive(standbyCanvasLastState);
                }
            }

            if (currentWaitTime <= 0)
            {
                gameEnded       = true;
                currentWaitTime = 0;
                UICanvas.SetActive(false);
            }

            if (gameEnded)
            {
                if (!endSEPlayed)
                {
                    SoundMgr.StopBgm();
                    SoundMgr.PlayVolSe("UDCGameEnd", 1.0f);
                    endSEPlayed = true;
                }
                SpecialModeCanvas.SetActive(true);
                SpecialModeCanvas.GetComponent <SpecialModeTransition>().Execute();
                MSMM.RankingTempData.TempScore = (uint)score;
                UDC.SpecialModeData.Time       = correctCommands;
                StartCoroutine(LateReset(3));
                SoundMgr.StopBgm();
            }
        }
Exemplo n.º 9
0
    void Update()
    {
        active += Time.deltaTime;
        if (active >= activeTime)
        {
            isCount = true;
        }

        if (isCount && Time.timeScale > 0 && limitTime > 0.0f)
        {
            limitTime = minite * 60 + second;
            //-1/s
            limitTime -= Time.deltaTime;

            //再設定
            minite = ((int)(limitTime)) / 60;
            second = limitTime - minite * 60;


            //時間を表示する
            if ((int)(second) != oldSecond)
            {
                timeText.text = minite.ToString("00") + ":" + ((int)second).ToString("00");
            }
            oldSecond = ((int)(second));


            //ワーニング
            if (limitTime <= 65)
            {
                isBoss = true;
            }
            if (limitTime <= 62)
            {
                isBoss = false;
            }

            //時間が0になったら
            if (limitTime <= 0.0f)
            {
                isTimeUp = true;
            }
        }

        //ワーニングテキスト
        if (isBoss)
        {
            wariningbanner.gameObject.SetActive(true);
            warinng.gameObject.SetActive(true);
        }
        else
        {
            wariningbanner.gameObject.SetActive(false);
            warinng.gameObject.SetActive(false);
        }

        //ゲーム終了テキスト
        if (!STGPlayer.isDead && isTimeUp && !STGBoss.isDead)
        {
            TimeUptext.gameObject.SetActive(true);
            SoundMgr.StopBgm();
        }
        else
        {
            TimeUptext.gameObject.SetActive(false);
        }


        //ゲームオーバーテキスト
        if (STGPlayer.isDead)
        {
            GameOvertext.gameObject.SetActive(true);
            SoundMgr.StopBgm();
        }
        else
        {
            GameOvertext.gameObject.SetActive(false);
        }


        //ゲームクリアテキスト
        if (!STGPlayer.isDead && STGBoss.isDead && !isTimeUp)
        {
            GameCleartext.gameObject.SetActive(true);
            SoundMgr.StopBgm();
        }
        else
        {
            GameCleartext.gameObject.SetActive(false);
        }
    }
Exemplo n.º 10
0
        void Update()
        {
            if (currentTime > 0)
            {
                GetInputs();
            }

            if (buttonCount > 0 && !animInit)
            {
                gameObject.GetComponentInChildren <Animator>().Play("Wiggle");
                animInit = true;
                textAnim.SetActive(true);
                popupRand.SetActive(true);
            }

            if (currentTime > 0 && buttonCount > 0)
            {
                currentTime -= Time.deltaTime;
            }

            if (currentTime <= 0)
            {
                gameObject.GetComponentInChildren <Animator>().Play("PopupSpecial");
                instructText.SetActive(false);
                resultCanvas.SetActive(true);
                if (!endSEPlayed)
                {
                    SoundMgr.PlaySe("UDCGameEnd");
                    endSEPlayed = true;
                    textAnim.GetComponent <TextAnimation>().Reset();
                    textAnim.SetActive(false);
                }
                SoundMgr.StopBgm();
            }

            if (resultCanvas.activeSelf == true)
            {
                var selector = resultCanvas.GetComponent <MSMM.MenuSelector>();
                var index    = selector.GetCurrentSelectedIndex();
                if (index == 0)
                {
                    if (Input.GetAxis("BottomGreen") == 1)
                    {
                        if (UDCommand.SelectedGameMode.GetMode() == (int)UDCommand.GameMode.Trial)
                        {
                            MSMM.RankingTempData.TempScore += (uint)buttonCount * 1;
                            SoundMgr.PlaySe("UDCDecide");
                            selector.Reset();
                            trans.GetComponent <MSMM.Transition>().LoadScene("UDCTrialResult");
                            MSMM.PlayCounter.AddCount(MSMM.CountType.UDCEnd);
                        }
                        else if (UDCommand.SelectedGameMode.GetMode() == (int)UDCommand.GameMode.Challenge)
                        {
                            MSMM.RankingTempData.TempScore += (uint)buttonCount * 1;
                            SoundMgr.PlaySe("UDCDecide");
                            selector.Reset();
                            trans.GetComponent <MSMM.Transition>().LoadScene("UDCChallengeResult");
                            MSMM.PlayCounter.AddCount(MSMM.CountType.UDCEnd);
                        }
                    }
                }
            }
        }