Пример #1
0
        public void Show()
        {
            if (!this.gameObject.activeInHierarchy)
            {
                this.gameObject.SetActive(true);
            }
            if (!string.IsNullOrEmpty(playerInfoButtonIconName))
            {
                gameResourceLoadManager.LoadAtlasSprite(playerInfoButtonIconName, delegate(string name, AtlasSprite atlasSprite, System.Object param)
                {
                    playerInfoButton.image.SetSprite(atlasSprite);
                }, true);
            }
            else
            {
                DebugUtils.LogError(DebugUtils.Type.UI_SocialScreen, string.Format("PlayerInfoButtonIconName or playerInfoIconPath is null, Check that."));
            }

            if (!this.canSendGift)
            {
                giveMoneyButton.GetComponent <Image>().SetGray(true);
                giveMoneyButton.onClick.RemoveAllListeners();
            }
            else
            {
                giveMoneyButton.GetComponent <Image>().SetGray(false);
                if (giveMoneyButton.onClick == null)
                {
                    giveMoneyButton.onClick.AddListener(OnGiveMoneyButtonClicked);
                }
            }

            /*if ( playerVipIconID != 0 )
             * {
             *      GameResourceLoadManager.GetInstance().LoadAtlasSprite( playerVipIconID, delegate ( string name, AtlasSprite atlasSprite, System.Object param )
             *      {
             *              playerVipIcon.SetSprite( atlasSprite );
             *      }, true );
             * }
             *
             * if ( playerRankIconID != 0 )
             * {
             *      GameResourceLoadManager.GetInstance().LoadAtlasSprite( playerRankIconID, delegate ( string name, AtlasSprite atlasSprite, System.Object param )
             *      {
             *              playerRankIcon.SetSprite( atlasSprite );
             *      }, true );
             * }*/

            playerNameText.text          = playerName;
            playerLevelText.text         = playerLevel.ToString();
            playerNetworkStatusText.text = playerNetworkStatus;
        }
Пример #2
0
        //If you want show this item must use SetData before this function.
        public void Show()
        {
            if (!this.gameObject.activeInHierarchy)
            {
                this.gameObject.SetActive(true);
            }
            if (!string.IsNullOrEmpty(playerIconName))
            {
                gameResourceLoadManager.LoadAtlasSprite(playerIconName, delegate(string name, AtlasSprite atlasSprite, System.Object param)
                {
                    playerInfoButton.image.SetSprite(atlasSprite);
                }, true);
            }
            else
            {
                DebugUtils.LogError(DebugUtils.Type.UI_SocialScreen, string.Format("The playerIconName or playerIconPath is null.Check that."));
            }

            //We table not have this ID,When they finished open this.Need modify.

            /*
             * if ( playerVipIconID != 0 )
             * {
             *      GameResourceLoadManager.GetInstance().LoadAtlasSprite( playerVipIconID, delegate ( string name, AtlasSprite atlasSprite, System.Object param )
             *      {
             *              playerVipIcon.SetSprite( atlasSprite );
             *      }, true );
             * }
             *
             * if ( playerRankIconID != 0 )
             * {
             *      GameResourceLoadManager.GetInstance().LoadAtlasSprite( playerRankIconID, delegate ( string name, AtlasSprite atlasSprite, System.Object param )
             *      {
             *              playerRankIcon.SetSprite( atlasSprite );
             *      }, true );
             * }*/

            playerNameText.text          = playerName;
            playerLevelText.text         = playerLevel.ToString();
            playerNetworkStatusText.text = playerNetworkStatus;
        }
        private void Show()
        {
            if (!this.gameObject.activeInHierarchy)
            {
                this.gameObject.SetActive(true);
            }

            if (!string.IsNullOrEmpty(playerInfoButtonIconName))
            {
                gameResourceLoadManager.LoadAtlasSprite(playerInfoButtonIconName, delegate(string name, AtlasSprite atlasSprite, System.Object param)
                {
                    playerInfoButton.image.SetSprite(atlasSprite);
                }, true);
            }
            else
            {
                DebugUtils.LogError(DebugUtils.Type.UI_SocialScreen, string.Format("PlayerInfoButtonIconName or playerInfoIconPath is null, Check that."));
            }

            playerNameText.text          = playerName;
            playerLevelText.text         = playerLevel.ToString();
            playerNetworkStatusText.text = playerNetworkStatus;
        }