예제 #1
0
        public void SetData(FinalPlayerData Data)
        {
            Vector3 position = mDMono.transform.parent.localPosition;

            position.x = mDMono.transform.parent.localPosition.x > 0 ? 1700 : -1700;
            mDMono.transform.parent.localPosition = position;

            ItemData = Data ?? new FinalPlayerData();

            if (ItemData == null || ItemData.Name == null)
            {
                Empty.CustomSetActive(true);
                Filled.CustomSetActive(false);
                SetMysterious(true);
            }
            else
            {
                Empty.CustomSetActive(false);
                Filled.CustomSetActive(true);
                Replace.CustomSetActive(false);
                Icon.spriteName  = ItemData.IconName;
                Frame.spriteName = ItemData.FrameName;
                Name.text        = Name.transform.GetChild(0).GetComponent <UILabel>().text = ItemData.Name;
                LadderRank.text  = LadderRank.transform.GetChild(0).GetComponent <UILabel>().text = string.Format(EB.Localizer.GetString("ID_LADDER_RANK") + ":[fff348]{0}", (ItemData.LadderRank > 0 ? ItemData.LadderRank.ToString() : EB.Localizer.GetString("ID_ARENA_RANK_OUT_OF_RANGE")));
                Dead.CustomSetActive(ItemData.Dead);

                SetMysterious();
            }
        }
예제 #2
0
 public void SetReplaceButton(bool CanReplace)
 {
     if (JoinBtn.activeSelf != CanReplace)
     {
         JoinBtn.CustomSetActive(CanReplace);
         if (ItemData != null && ItemData.uid == LoginManager.Instance.LocalUserId.Value)
         {
             Replace.CustomSetActive(false);
         }
         else
         {
             Replace.CustomSetActive(CanReplace);
         }
     }
 }