Example #1
0
    public void StopDaoJiShi()
    {
        //SSDebug.Log("StopDaoJiShi******************************************************IsPlayDaoJishi " + IsPlayDaoJishi + ", Time ======= " + Time.time.ToString("f2"));
        if (GameOverObj.activeInHierarchy == true)
        {
            if (IsInvoking("HiddenGameOverObj"))
            {
                CancelInvoke("HiddenGameOverObj");
            }
            GameOverObj.SetActive(false);
        }

        if (!IsPlayDaoJishi)
        {
            //重置玩家信息.
            XkGameCtrl.GetInstance().ResetPlayerInfo(PlayerIndex);
            XKPlayerScoreCtrl.ShowPlayerScore(PlayerIndex);
            return;
        }
        IsPlayDaoJishi = false;
        CountDaoJiShi--;
        ContinueGameObj.SetActive(false);
        DaoJiShiObj.SetActive(false);
        //m_TVYaoKongEnterObj.SetActive(false);

        bool isActive = XkGameCtrl.GetIsActivePlayer(PlayerIndex);

        if (isActive == false && pcvr.GetInstance() != null)
        {
            pcvr.GetInstance().m_HongDDGamePadInterface.OnPlayerGameDaoJiShiOver(PlayerIndex);
        }
    }
    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 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();
            }
        }
    }
Example #4
0
    public void StopDaoJiShi()
    {
        if (GameOverObj.activeInHierarchy == true)
        {
            if (IsInvoking("HiddenGameOverObj"))
            {
                CancelInvoke("HiddenGameOverObj");
            }
            GameOverObj.SetActive(false);
        }

        if (!IsPlayDaoJishi)
        {
            //重置玩家信息.
            XkGameCtrl.GetInstance().ResetPlayerInfo(PlayerIndex);
            XKPlayerScoreCtrl.ShowPlayerScore(PlayerIndex);
            return;
        }
        IsPlayDaoJishi = false;
        CountDaoJiShi--;
        ContinueGameObj.SetActive(false);
        DaoJiShiObj.SetActive(false);
        //m_TVYaoKongEnterObj.SetActive(false);
    }