Esempio n. 1
0
 public void RefreshUnion()
 {
     _memberList.Clear();
     if (Main.netMode == 1)
     {
         MessageSender.GetComplexUnionData();
     }
     else
     {
         for (var i = 0; i < 19; i++)
         {
             var testinfo = new JsonData.SimplifiedPlayerInfo
             {
                 Name    = ServerUtils.RandomGenString(),
                 IsLogin = Main.rand.NextBool(),
             };
             var bar = new UIUnionMemberBar(testinfo, Main.rand.Next(2) == 0 ? UnionPosition.会员 : UnionPosition.建筑师, Main.rand.Next(10000000));
             _memberList.Add(bar);
         }
         var ownerinfo = new JsonData.SimplifiedPlayerInfo
         {
             Name    = "Skirt",
             IsLogin = true,
         };
         _memberList.Add(new UIUnionMemberBar(ownerinfo, UnionPosition.会长, Main.rand.Next(10000000)));
         _memberList.Sort();
         unionNameText.SetText("裙中世界");
         AdjustOwnerUI(true);
     }
     _relaxTimer = 180;
     _rotation   = 0f;
 }
Esempio n. 2
0
 private void SortPlayers()
 {
     uIPlayerBars.Sort();
     _onlinePlayerList.Sort();
     //foreach (var ui in uIPlayerBars)
     //{
     //	_onlinePlayerList.Add(ui);
     //}
 }