public void ActiveJiFenJieMian()
	{
		if (Network.peerType == NetworkPeerType.Server) {
			return;
		}

		if (JiFenJieMianObj.activeSelf) {
			return;
		}
//		FinishTaskObj.SetActive(false);
		IsShowFinishTask = true;
		IsMakeJiFenStop = false;
		pcvr.CloseAllQiNangArray(PlayerEnum.Null, 1);

		if (!JiFenZongJieMianObj.activeSelf) {
			CoinPlayerCtrl.GetInstanceOne().HiddenPlayerCoin();
			CoinPlayerCtrl.GetInstanceTwo().HiddenPlayerCoin();
			CoinPlayerCtrl.GetInstanceThree().HiddenPlayerCoin();
			CoinPlayerCtrl.GetInstanceFour().HiddenPlayerCoin();
			GameTimeCtrl.GetInstance().HiddenGameTime();
			DaoJuCtrl.GetInstance().HiddenAllPlayerDaoJu();
			DongGanUICtrl.InstanceOne.HiddenDongGanUI();
			DongGanUICtrl.InstanceTwo.HiddenDongGanUI();
			DongGanUICtrl.InstanceThree.HiddenDongGanUI();
			DongGanUICtrl.InstanceFour.HiddenDongGanUI();
			JiFenZongJieMianObj.SetActive(true);
		}
		PaiMingCtrl.GetInstance().ShowGamePaiMing();

		System.GC.Collect();
		JiFenJieMianObj.SetActive(true);
		Invoke("StopJiFenTime", 8f);
	}
    public void StopJiFenTime()
    {
        if (Time.realtimeSinceStartup - TimeStartVal < 8f)
        {
            Debug.Log("Unity:" + "StopJiFenTime -> TimeStartVal was wrong!");
            return;
        }

        if (IsMakeJiFenStop)
        {
            return;
        }
        IsMakeJiFenStop  = true;
        IsShowFinishTask = false;
        JiFenJieMianObj.SetActive(false);
        Debug.Log("Unity:" + "StopJiFenTime...");

        if (GameOverCtrl.IsShowGameOver)
        {
            XkGameCtrl.LoadingGameMovie();
            return;
        }

        CountJiFenOpen++;
#if CREAT_GAME_SCENE
        //动态加载下一关的游戏场景预制文件.
        XkGameCtrl.GetInstance().m_CreatSceneCom.CreatGameScene(CountJiFenOpen);
#endif

#if USE_LOADING_NEXT_SCENE
        //直接加载下一关的游戏场景.
        if (Application.loadedLevel < 4)
        {
            Application.LoadLevel(Application.loadedLevel + 1);
        }
        else
        {
            Application.LoadLevel(0);
        }
#endif

        //CountJiFenOpen = 4; //test.
        if (CountJiFenOpen < 4)
        {
            XKBossXueTiaoCtrl.IsWuDiPlayer          = false;
            XKTriggerStopMovePlayer.IsActiveTrigger = false;
            GameTimeCtrl.GetInstance().OpenGameTime();

            CoinPlayerCtrl.GetInstanceOne().ShwoPlayerCoin();
            CoinPlayerCtrl.GetInstanceTwo().ShwoPlayerCoin();
            CoinPlayerCtrl.GetInstanceThree().ShwoPlayerCoin();
            CoinPlayerCtrl.GetInstanceFour().ShwoPlayerCoin();
            DaoJuCtrl.GetInstance().ShowAllPlayerDaoJu();
            XKPlayerScoreCtrl.ShowPlayerScore(PlayerEnum.Null);
        }
        else
        {
            QuanBuTongGuanCtrl.GetInstance().ShowQuanBuTongGuan();
        }
    }
    public static void SetCoinPlayerFour(int coin)
    {
        if (pcvr.bIsHardWare == false)
        {
            if (coin > 0 && CoinPlayerFour != coin)
            {
                PlayTouBiAudio();
                if (coin > CoinPlayerFour)
                {
                    Instance.SetTotalInsertCoins(Instance.m_TotalInsertCoins + (coin - CoinPlayerFour));
                }
            }
        }

        CoinPlayerFour = coin;
        if (CoinPlayerCtrl.GetInstanceFour() != null)
        {
            CoinPlayerCtrl.GetInstanceFour().SetPlayerCoin(coin);
        }

        if (SetPanelUiRoot.GetInstance() != null)
        {
            SetPanelUiRoot.GetInstance().SetCoinStartLabelInfo(1);
        }
    }
    public void StopJiFenTime()
    {
        if (Time.realtimeSinceStartup - TimeStartVal < 8f)
        {
            Debug.Log("Unity:" + "StopJiFenTime -> TimeStartVal was wrong!");
            return;
        }

        if (IsMakeJiFenStop)
        {
            return;
        }
        IsMakeJiFenStop  = true;
        IsShowFinishTask = false;
        JiFenJieMianObj.SetActive(false);
        Debug.Log("Unity:" + "StopJiFenTime...");

        if (GameOverCtrl.IsShowGameOver)
        {
            XkGameCtrl.LoadingGameMovie();
            return;
        }

        CountJiFenOpen++;
        //CountJiFenOpen = 4; //test.
        if (CountJiFenOpen < 4)
        {
            XKBossXueTiaoCtrl.IsWuDiPlayer          = false;
            XKTriggerStopMovePlayer.IsActiveTrigger = false;
            if (GameTimeCtrl.GetInstance() != null)
            {
                GameTimeCtrl.GetInstance().OpenGameTime();
            }

            CoinPlayerCtrl.GetInstanceOne().ShwoPlayerCoin();
            CoinPlayerCtrl.GetInstanceTwo().ShwoPlayerCoin();
            CoinPlayerCtrl.GetInstanceThree().ShwoPlayerCoin();
            CoinPlayerCtrl.GetInstanceFour().ShwoPlayerCoin();
            DaoJuCtrl.GetInstance().ShowAllPlayerDaoJu();
            XKPlayerScoreCtrl.ShowPlayerScore(PlayerEnum.Null);
        }
        else
        {
            if (QuanBuTongGuanCtrl.GetInstance() != null)
            {
                QuanBuTongGuanCtrl.GetInstance().ShowQuanBuTongGuan();
            }
        }
    }
Beispiel #5
0
    public static void SetCoinPlayerFour(int coin)
    {
        if (coin > 0 && CoinPlayerFour != coin)
        {
            PlayTouBiAudio();
        }
        CoinPlayerFour = coin;
        if (CoinPlayerCtrl.GetInstanceFour() != null)
        {
            CoinPlayerCtrl.GetInstanceFour().SetPlayerCoin(coin);
        }

        if (SetPanelUiRoot.GetInstance() != null)
        {
            SetPanelUiRoot.GetInstance().SetCoinStartLabelInfo(1);
        }
    }