Exemplo n.º 1
0
    void Update()
    {
        // PvPモードの時
        if (gameData.Mode == 0)
        {
            // アケコン
            if (controllerName == "Arcade Stick (MadCatz FightStick Neo)")
            {
                if (enter.GetEnterFlag() != false)
                {
                    PVPcontrol("Arcade");
                }
            }
            // XBOXコントローラ
            else
            {
                if (enter.GetEnterFlag() != false)
                {
                    PVPcontrol("Xbox");
                }
            }
        }
//=====================================================================================================================
        // PvCモードの時
        else if (gameData.Mode == 1)
        {
            if (controllerName == "Arcade Stick (MadCatz FightStick Neo)")
            {
                if (enter.GetEnterFlag() != false)
                {
                    PVCcontrol("Arcade");
                }
            }
            else
            {
                if (enter.GetEnterFlag() != false)
                {
                    PVCcontrol("Xbox");
                }
            }
        }

        if (Input.GetButtonDown("AButton"))
        {
            if (charName != "None" && selectName == null)
            {
                selectName = charName;
            }
        }
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if ((selectPlayer1.GetP1Frag() == false) && (selectPlayer2.GetP2Frag() == false))
        {
            startFlag = true;
            if (sound)
            {
                audio.Play();
                sound = false;
            }
            if (transform.localPosition.x < 0f)
            {
                speed = 100f;
            }
            else
            {
                speed = 0;
            }

            if (alpha <= 255)
            {
                alpha += 20f / 255f;
            }
            this.transform.localPosition += new Vector3(speed, 0, 0);
            image.color = new Color(255, 255, 255, alpha);
        }
        else
        {
            startFlag = false;
            sound     = true;
            this.transform.localPosition = new Vector3(-800, -125, 0);
            image.color = new Color(255, 255, 255, 0);
            speed       = 0;
            alpha       = 0;
        }
        if (enter.GetEnterFlag() == false)
        {
            alpha = 255;
        }
    }
Exemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     if (enter.GetEnterFlag() == true)
     {
         if (returnMenu.activeSelf)
         {
             //戻るメニューを消す
             if (GamePad.GetButtonDown(GamePad.Button.B, GamePad.Index.One))
             {
                 controllerNum = 0;
                 returnMenu.SetActive(false);
                 menuFlag = false;
                 audio.PlayOneShot(cancelSE, 1.0f);
             }
             else if (GamePad.GetButtonDown(GamePad.Button.B, GamePad.Index.Two))
             {
                 controllerNum = 0;
                 returnMenu.SetActive(false);
                 menuFlag = false;
                 audio.PlayOneShot(cancelSE, 1.0f);
             }
         }
         else
         {
             //戻るメニューを開く
             if (GamePad.GetButtonDown(GamePad.Button.B, GamePad.Index.One))
             {
                 controllerNum = 1;
                 returnMenu.SetActive(true);
                 menuFlag = true;
                 audio.PlayOneShot(dicideSE, 1.0f);
             }
             else if (GamePad.GetButtonDown(GamePad.Button.B, GamePad.Index.Two))
             {
                 controllerNum = 2;
                 returnMenu.SetActive(true);
                 menuFlag = true;
                 audio.PlayOneShot(dicideSE, 1.0f);
             }
         }
         //メニューを開いていたら操作する
         if (menuFlag)
         {
             //XBOXコントローラーの時
             if (controllerName == "")
             {
                 if (controllerNum == 1)
                 {
                     MenuMove(controllerName, GamePad.Index.One);
                 }
                 else if (controllerNum == 2)
                 {
                     MenuMove(controllerName, GamePad.Index.Two);
                 }
             }
             //アケコンの時
             else
             {
                 if (controllerNum == 1)
                 {
                     MenuMove(controllerName, GamePad.Index.One);
                 }
                 else if (controllerNum == 2)
                 {
                     MenuMove(controllerName, GamePad.Index.Two);
                 }
             }
         }
     }
 }
Exemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        // Escapeキーでゲームを終了する
        if (Input.GetKey(KeyCode.Escape))
        {
//#if UNITY_EDITOR
//            EditorApplication.isPlaying = false;
//#elif UNITY_STANDALONE
//                Application.Quit();
//#endif
            //AIの初期化
        }
        //====================================================================================================
        // タイトルシーンでの処理
        if (SceneManager.GetActiveScene().name == "TitleScene")
        {
            if (sceneFlag)
            {
                if (Input.anyKeyDown)
                {
                    sceneFlag = false;
                    audio.Stop();
                    audio.PlayOneShot(dicideSE, 1.0f);
                    fade.FadeOutFlag();
                }
            }
            if (fade.GetAlpha() >= 1.0f)
            {
                scene.SceneChange("menu");
            }
        }
        //====================================================================================================
        // キャラクターセレクトシーンでの処理
        if (SceneManager.GetActiveScene().name == "SelectScene")
        {
            if (enter.GetEnterFlag() == false)
            {
                fade.FadeOutFlag();
                if (fade.GetAlpha() >= 1.0f)
                {
                    scene.SceneChange("play");
                }
            }
            //if (select.GetP1Frag() == false && select2.GetP2Frag() == false)
            //{
            //    fade.FadeOutFlag();
            //    if (fade.GetAlpha() >= 1.0f)
            //    {
            //        scene.SceneChange("play");
            //    }
            //}
            if (menu.GetSceneFlag())
            {
                if (!fadeFlag)
                {
                    fade.FadeOutFlag();
                }
                if (fade.GetAlpha() >= 1.0f)
                {
                    scene.SceneChange("menu");
                }
            }
        }
        //====================================================================================================
        //プレイメニューシーンでの処理
        if (SceneManager.GetActiveScene().name == "PlayMenuScene")
        {
            if (Input.GetButtonDown("AButton") && sceneFlagMenu == false)
            {
                fade.FadeOutFlag();
                audio.PlayOneShot(dicideSE, 1.0f);
                sceneFlagMenu = true;
                //float a = fade.GetAlpha();
            }
            if (fade.GetAlpha() >= 1.0f && sceneFlagMenu)
            {
                datare.Mode   = sys.menuType;
                sceneFlagMenu = false;
                scene.SceneChange("select");
            }
        }
        //====================================================================================================
        // タイトルシーン以外での処理
        if (SceneManager.GetActiveScene().name != "TitleScene")
        {
            if (fade.GetAlpha() >= 1.0f && fadeFlag == true)
            {
                fade.FadeInFlag();
                fadeFlag = false;
            }
            if (fadeFlag)
            {
                if (fade.GetAlpha() >= 1.0f)
                {
                    fade.FadeInFlag();
                    fadeFlag = false;
                }
            }
        }
    }