예제 #1
0
        private void Awake()
        {
            // TODO C# UIMainmapWindow 接口不可用,需要改成新的控制方式
            //UIMainmapWindow uiMainMap = UIManager.Instance.GetWindowImm<UIMainmapWindow>();
            //Transform anchorTarget = uiMainMap.FindChild("MinimapBgSprite").transform;
            //             UIWidget widget = goUnfold.GetComponent<UIWidget>();
            //             widget.leftAnchor.target = anchorTarget;
            //             widget.rightAnchor.target = anchorTarget;
            //             widget.bottomAnchor.target = anchorTarget;
            //             widget.topAnchor.target = anchorTarget;
            //             widget.ResetAndUpdateAnchors();

            instance = this;
            OnUnFold();
            OnAmountChanged(null);
            goSwitchBoard.SetActive(false);

            string[] splits = GameConstHelper.GetString("GAME_MWAR_WILD_HUMAN_COLOUR").Split(',', '[', ']');
            int      index  = 0;

            foreach (var item in splits)
            {
                float f = 0;
                if (index < mPercent.Length && float.TryParse(item, out f))
                {
                    mPercent[index] = f;
                    ++index;
                }
            }
        }
예제 #2
0
 public void Set(uint id, uint num)
 {
     mId = id;
     DBInstance.InstanceInfo info = DBManager.Instance.GetDB <DBInstance>().GetInstanceInfo(id);
     if (id == GameConstHelper.GetUint("GAME_WILD_DUNGEON_PRIMARY_ID"))
     {
         labelName.text = info.mName + string.Format(DBConstText.GetText("PRIMARY_TITLE_SUFFIX"), GameConstHelper.GetUint("GAME_WILD_PRIMARY_BATTLE_POWER"));
     }
     else
     {
         labelName.text = info.mName;
     }
     UIWIldSwitchLine.SetAmount(spriteProgress, num);
     if (WildManager.Instance.mCurrentLineId == id)
     {
         goHead.SetActive(true);
         RoleHelp.GetIconName(Game.GetInstance().LocalPlayerTypeID, texHead);
         goButton.SetActive(false);
     }
     else
     {
         goHead.SetActive(false);
         goButton.SetActive(true);
         if (id == WildManager.Instance.mCurrentWaitingLineId)
         {
             lableButton.text = xc.DBConstText.GetText("IN_QUEUE");
         }
         else
         {
             lableButton.text = xc.DBConstText.GetText("GOTO");
         }
     }
 }