Exemplo n.º 1
0
        private async void UpdatePlayerInfoData()
        {
            UINetLoadingComponent.showNetLoading();
            G2C_UpdatePlayerInfo g2c = (G2C_UpdatePlayerInfo)await SessionComponent.Instance.Session
                                       .Call(new C2G_UpdatePlayerInfo
            {
                Uid        = PlayerInfoComponent.Instance.uid,
                playerInfo = PlayerInfoComponent.Instance.GetPlayerInfo()
            });

            UINetLoadingComponent.closeNetLoading();
        }
Exemplo n.º 2
0
        private async void UpdateIcon()
        {
            Game.Scene.GetComponent <PlayerInfoComponent>().GetPlayerInfo().Icon = curIcon.sprite.name.ToString();

            UINetLoadingComponent.showNetLoading();
            G2C_UpdatePlayerInfo g2CPlayerInfo = (G2C_UpdatePlayerInfo)await SessionComponent.Instance.Session.Call(new C2G_UpdatePlayerInfo()
            {
                Uid        = PlayerInfoComponent.Instance.uid,
                playerInfo = PlayerInfoComponent.Instance.GetPlayerInfo()
            });

            UINetLoadingComponent.closeNetLoading();

            Game.Scene.GetComponent <UIComponent>().Get(UIType.UIMain).GetComponent <UIMainComponent>().refreshUI();
            Game.Scene.GetComponent <UIComponent>().Get(UIType.UIPlayerInfo).GetComponent <UIPlayerInfoComponent>().Update();
        }