private void EnterStart()
 {
     if (UniGameOptionsDefine.chargeMode == UniInsertCoinsOptionsFile.GameChargeMode.Mode_Free || UniGameOptionsDefine.chargeMode == UniInsertCoinsOptionsFile.GameChargeMode.Mode_InsertCoins)
     {
         if (GameRoot.gameProcessControl.currentProcess.processType == ModalProcessType.Process_SelectMap)
         {
             if (!((RaceSceneControl)GameRoot.CurrentSceneControl).XiongDaIsEnterStart)
             {
                 //Debug.Log("选择地图:::开始游戏1");
                 if (ConsoleCenter.IsCanStartGame(IParkourPlayer_Xiong.PlayerIndex.Index_P1) &&
                     InputDevice.ButtonEnter((int)IParkourPlayer_Xiong.PlayerIndex.Index_P1))
                 {
                     // Debug.Log("选择地图:::已开始游戏1");
                     ConsoleCenter.PlayerStartGamePayCoins(IParkourPlayer_Xiong.PlayerIndex.Index_P1);
                     ((RaceSceneControl)GameRoot.CurrentSceneControl).XiongDaIsEnterStart = true;
                     InputDevice.SetEggNums(0, UniGameOptionsDefine.CoinsEggNums_1P);
                     StandbyProcess.UpdateCoinsUI(IParkourPlayer_Xiong.PlayerIndex.Index_P1);
                 }
             }
             if (!((RaceSceneControl)GameRoot.CurrentSceneControl).Xiong2IsEnterStart)
             {
                 //Debug.Log("选择地图:::开始游戏2");
                 if (ConsoleCenter.IsCanStartGame(IParkourPlayer_Xiong.PlayerIndex.Index_P2) &&
                     InputDevice.ButtonEnter((int)IParkourPlayer_Xiong.PlayerIndex.Index_P2))
                 {
                     //Debug.Log("选择地图:::已开始游戏2");
                     ConsoleCenter.PlayerStartGamePayCoins(IParkourPlayer_Xiong.PlayerIndex.Index_P2);
                     ((RaceSceneControl)GameRoot.CurrentSceneControl).Xiong2IsEnterStart = true;
                     InputDevice.SetEggNums(1, UniGameOptionsDefine.CoinsEggNums_1P);
                     StandbyProcess.UpdateCoinsUI(IParkourPlayer_Xiong.PlayerIndex.Index_P2);
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
    //初始化界面UI
    public void InitUI()
    {
        m_ShowInsertCoins   = new GuiPlaneAnimationPlayer[2];
        m_ShowEnterJionGame = new GuiPlaneAnimationPlayer[2];
        m_GameCoins         = new GuiPlaneAnimationText[2];
        m_GameCoinsDeno     = new GuiPlaneAnimationText[2];
        m_WaitMeUI          = new GameObject[2];

        m_GameComLogo = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("LOGO.prefab", GameRoot.gameResource).GetComponent <GuiPlaneAnimationPlayer>();

        m_ShowInsertCoins[0] = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("Prompt_InsertCoins_Left.prefab", GameRoot.gameResource).GetComponent <GuiPlaneAnimationPlayer>();
        m_ShowInsertCoins[1] = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("Prompt_InsertCoins_Right.prefab", GameRoot.gameResource).GetComponent <GuiPlaneAnimationPlayer>();

        m_ShowEnterJionGame[0] = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("Prompt_EnterJionGame_Left.prefab", GameRoot.gameResource).GetComponent <GuiPlaneAnimationPlayer>();
        m_ShowEnterJionGame[1] = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("Prompt_EnterJionGame_Right.prefab", GameRoot.gameResource).GetComponent <GuiPlaneAnimationPlayer>();

        m_GameCoins[0]     = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("MainUI_Coins_Left.prefab", GameRoot.gameResource).GetComponent <GuiPlaneAnimationText>();
        m_GameCoins[1]     = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("MainUI_Coins_Right.prefab", GameRoot.gameResource).GetComponent <GuiPlaneAnimationText>();
        m_GameCoinsDeno[0] = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("MainUI_Coins_Denominator_Left.prefab", GameRoot.gameResource).GetComponent <GuiPlaneAnimationText>();
        m_GameCoinsDeno[1] = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("MainUI_Coins_Denominator_Right.prefab", GameRoot.gameResource).GetComponent <GuiPlaneAnimationText>();
        //m_PlayerIdBearPrefabControl[0] = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("PlayerIdBearPrefab_XiongDa.prefab", GameRoot.gameResource).GetComponent<PlayerIdBearPrefabControl>();
        //m_PlayerIdBearPrefabControl[1] = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("PlayerIdBearPrefab_Xiong2.prefab", GameRoot.gameResource).GetComponent<PlayerIdBearPrefabControl>();

        m_PlayerScoreControl = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("PlayerScoreControl.prefab", GameRoot.gameResource).GetComponent <PlayerScoreControl>();
        m_PlayerScoreControl.Initialization();

        m_Remainder = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("MainUI_Remainder.prefab", GameRoot.gameResource).GetComponent <GuiPlaneAnimationTextAdvanced>();
        m_Remainder.gameObject.SetActive(false);

        m_WaitMeUI[0] = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("WaitMe_Left.prefab", GameRoot.gameResource);
        m_WaitMeUI[1] = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("WaitMe_Right.prefab", GameRoot.gameResource);
        for (int i = 0; i < m_WaitMeUI.Length; i++)
        {
            m_WaitMeUI[i].SetActive(false);
        }

        StandbyProcess.UpdateCoinsUI(IParkourPlayer_Xiong.PlayerIndex.Index_P1);
        StandbyProcess.UpdateCoinsUI(IParkourPlayer_Xiong.PlayerIndex.Index_P2);
        m_GameCoins[(int)IParkourPlayer_Xiong.PlayerIndex.Index_P1].Text = StandbyProcess.CoinsNum[(int)IParkourPlayer_Xiong.PlayerIndex.Index_P1];
        m_GameCoins[(int)IParkourPlayer_Xiong.PlayerIndex.Index_P2].Text = StandbyProcess.CoinsNum[(int)IParkourPlayer_Xiong.PlayerIndex.Index_P2];

        m_GameCoinsDeno[(int)IParkourPlayer_Xiong.PlayerIndex.Index_P1].Text = UniGameOptionsDefine.StartGameCoins.ToString();
        m_GameCoinsDeno[(int)IParkourPlayer_Xiong.PlayerIndex.Index_P2].Text = UniGameOptionsDefine.StartGameCoins.ToString();
        //m_DownPrompt_GameOverProcess.Play();
        //m_DownPrompt_GameRaceProcess.gameObject.SetActive(false);
        //m_DownPrompt_GameContinueProcess.gameObject.SetActive(false);
    }
Exemplo n.º 3
0
    //初始化函数
    public override void Initialization()
    {
        //进行一次内存释放
        //Debug.Log("进行一次内存释放");
        UniGameResources.UnloadUnusedAssets();


        GameRoot.uiOrthographicCamera.LoadResource_UIPrefabs("FadeScreen.prefab", GameRoot.gameResource);
        InitUI();
        m_GameOverTime = m_GameContinueControl.m_GameOverTime;
        //开始音乐播放
        MusicPlayer.Stop(true);
        MusicPlayer.Play("continue.ogg", true);
        timeLocker.IsLocked = true;
        ResetIsEnterStart();
        StandbyProcess.UpdateCoinsUI(IParkourPlayer_Xiong.PlayerIndex.Index_P1);
        StandbyProcess.UpdateCoinsUI(IParkourPlayer_Xiong.PlayerIndex.Index_P2);
    }
Exemplo n.º 4
0
    //关闭
    public void InitUI()
    {
        ((RaceSceneControl)GameRoot.CurrentSceneControl).m_Remainder.gameObject.SetActive(false);

        ((RaceSceneControl)GameRoot.CurrentSceneControl).m_PlayerScoreControl.gameObject.SetActive(true);
        ((RaceSceneControl)GameRoot.CurrentSceneControl).SetPlayerScore();
        ((RaceSceneControl)GameRoot.CurrentSceneControl).m_PlayerScoreControl.Initialization();

        ((RaceSceneControl)GameRoot.CurrentSceneControl).m_GameComLogo.gameObject.SetActive(true);
        ((RaceSceneControl)GameRoot.CurrentSceneControl).m_GameComLogo.Stop();
        ((RaceSceneControl)GameRoot.CurrentSceneControl).m_GameComLogo.Play();

        StandbyProcess.UpdateCoinsUI(IParkourPlayer_Xiong.PlayerIndex.Index_P1);
        StandbyProcess.UpdateCoinsUI(IParkourPlayer_Xiong.PlayerIndex.Index_P2);

        ((RaceSceneControl)GameRoot.CurrentSceneControl).m_GameProcess = RaceSceneControl.GameProcessLock.GameOver;
        IsLock = false;
        //初始化一次待机轨迹任务
        //TrackCommand.InitializationExecuteList(TrackCommand.standbyTrackCommand, TrackCommand.standbyTrackCommandExecute);
    }