Esempio n. 1
0
        public async override void Run()
        {
            ETModel.Game.Scene.GetComponent <SoundComponent>().PlayClip(DataCenterComponent.Instance.soundInfo.click);

            DDZGameHelper.CurrentGameInfo = GameHelper.GetGameInfo(GameType.DouDiZhu);

            GameHelper.CurrentGameInfo = GameHelper.GetGameInfo(GameType.DouDiZhu);

            GameHelper.CurrentGameInfo.GameId = 1;

            var ares = await GameHelper.GetGameAreaList(DDZGameHelper.CurrentGameInfo.GameId);

            DDZUIFactory.Init();

            //OnDDZ_LevelButton();
            GameLobbyFactory.Remove();

            var ui = Game.Scene.GetComponent <UIComponent>()?.Get(UIType.UIDDZFieldScene);

            if (ui == null)
            {
                DDZUIFactory.fieldScene.Create();
            }
            else
            {
                ui.GetComponent <UIDDZFieldScene>().OnShow();
            }
        }
Esempio n. 2
0
        public override void Run(int GameId, int RoomId, GameReBackData backData)
        {
            if (GameId == 7)
            {
                DDZGameHelper.CurrentGameInfo = GameHelper.GetGameInfo(GameType.DouDiZhu);

                GameLobbyFactory.Remove();

                DDZUIFactory.Init();

                DDZGameHelper.RoomId = RoomId;

                DDZGameHelper.CurrentFieldId = backData.index;

                //清除重回数据
                backData = null;

                DataCenterComponent.Instance.GameReBackInfo.backData = null;

                DataCenterComponent.Instance.GameReBackInfo.isBackSuccess = false;

                PlayerPrefs.DeleteKey(DataCenterComponent.Instance.GameReBackInfo.reBackDataKey);

                DDZUIFactory.gameScene.Create();
            }
        }