Ejemplo n.º 1
0
        public void AddFinishCounter()
        {
            this.finishCount++;

            if (finishCount >= Limit)
            {
                EnterGameEvent.SendEvent(this);
            }
        }
Ejemplo n.º 2
0
    protected override void OnRespond(respond_enter_game respond, object userdata)
    {
        if (respond.result == (int)ERROR_CODE.ERR_ENTER_GAME_OK)
        {
            GameDebug.Log("进入游戏成功");

            PlayerDataModule module = ModuleManager.Instance.FindModule <PlayerDataModule>();
            module.setGUID(respond.guid);
            module.SyncPlayerProperty(respond.prop);
            EnterGameEvent e = new EnterGameEvent(EnterGameEvent.ENTER_GAME);

            EventSystem.Instance.PushEvent(e);

            GameApp.Instance.setNextFlow(GAME_FLOW_ENUM.GAME_FLOW_MAIN);
        }
        else
        {
            GameDebug.Log("进入游戏失败");
        }
    }