Пример #1
0
        void OnUpdateRaidRanking(EventData eventData)
        {
            var data = BinSerializer.ConvertData <ProtoData.RaidRankingData> (eventData.Parameters);

            TransitionManager.Instance.OnWaitSigh(false);

            MainLobbyGameMode gameMode = GameManager.Instance.GameMode as MainLobbyGameMode;

            if (gameMode == null)
            {
                return;
            }

            MainLobbyPage page = gameMode.CurrentPage as MainLobbyPage;

            if (page == null)
            {
                return;
            }

            RankingPopup popup = page.rankingPopup;

            popup.SetRemainTime(data.tick);
            popup.SetInfoForMyRanking(data.myRankingData);
            popup.SetInfoForLastHitRnaking(data.lastHitRankingData);
            popup.SetInfo(data.rankingDataList);
            page.OnUpdate( );
        }
Пример #2
0
        void OnUpdateRaidBoss(EventData eventData)
        {
            var data = BinSerializer.ConvertData <ProtoData.RaidBossData> (eventData.Parameters);

            switch (GameManager.Instance.GameMode)
            {
            case MainLobbyGameMode mainLobby:
            {
                MainLobbyPage page = mainLobby.CurrentPage as MainLobbyPage;
                if (page == null)
                {
                    return;
                }
                page.rankingPopup.SetHP(data.hp, data.index);
            }
            break;

            case RaidGameMode raid:
            {
                RaidBattlePage page = raid.CurrentPage as RaidBattlePage;
                if (page == null)
                {
                    return;
                }
            }
            break;
            }
        }
    protected override void OnComplete( )
    {
        SoundManager.Instance.play(LoadManager.Instance.GetSFXData(SFXType.Tabsound).clip, AudioSettings.dspTime + Time.deltaTime, 0F, 1F);
        MainLobbyPage page = GameManager.Instance.GameMode.CurrentPage as MainLobbyPage;

        if (page == null)
        {
            return;
        }

        page.OnBarrackInfo(info);
        page.OnUpdate( );
    }
Пример #4
0
        void OnUpdateChat(EventData eventData)
        {
            var data = BinSerializer.ConvertData <ProtoData.ChatData> (eventData.Parameters);

            MainLobbyPage page = GameManager.Instance.GameMode.CurrentPage as MainLobbyPage;

            if (page == null)
            {
                return;
            }
            page.chatPopup.AddChat(data.index, data.nickname, data.msg);
            GameManager.Instance.GameMode.CurrentPage.OnUpdate( );
        }
        void OnUpdateResource(EventData eventData)
        {
            MainLobbyGameMode gameMode = GameManager.Instance.GameMode as MainLobbyGameMode;

            if (gameMode == null)
            {
                return;
            }

            var        data        = BinSerializer.ConvertData <ProtoData.ResourceData> (eventData.Parameters);
            GamePlayer localPlayer = GameManager.Instance.LocalPlayer;

            localPlayer.SetGold(ResourceType.Gold, data.gold);
            localPlayer.SetGold(ResourceType.Cash, data.cash);
            localPlayer.playerInfo.Tier = (TierType)data.tier;

            MainLobbyPage page = gameMode.CurrentPage as MainLobbyPage;

            if (page == null)
            {
                return;
            }
            GameManager.Instance.GameMode.CurrentPage.OnUpdate( );
        }