Example #1
0
    /** 显示战斗中的界面 */
    private void showFightingUI()
    {
        if (!isAwakeformHide && data.areas.Count == 1 && !GuildFightSampleManager.Instance().isGuildFightOver())
        {
            MessageWindow.ShowAlert(Language("GuildArea_46"));
        }
        //buttonRevive.gameObject.SetActive (data.isDead);
        //buttonRevive.disableButton (!data.isDead);
//		if (!data.isDead) {
//			buttonRevive.textLabel.effectColor = new Color (0.22f, 0.22f, 0.22f);
//		} else {
//			buttonRevive.textLabel.effectColor = new Color (0.67f, 0.05f, 0.075f);
//		}
        buttonRank.gameObject.SetActive(true);
        buttonGetPower.disableButton(!data.get_power);
        buttonRule.gameObject.SetActive(true);
        notOpenGroup.SetActive(false);
        areaGroup.SetActive(true);
        GuildAreaPreInfo [] preArray = new GuildAreaPreInfo[data.areas.Count];
        data.areas.CopyTo(preArray);
        SetKit.sort(preArray, new GuildAreaPreCompareWithWarNum());
        List <GuildAreaPreInfo> list = new List <GuildAreaPreInfo> ();

        list.AddRange(preArray);
        for (int i = 0; i < data.areas.Count; i++)
        {
            data.areas [i].rank = list.IndexOf(data.areas [i]) + 1;
            areaItems [i].initUI(data.areas [i], data.curBlood, data.maxBlood);
        }
        initSmallMan();
        showTips();
    }
Example #2
0
    private void updateRankInfo(int integral)
    {
        bool isExist = false;

        foreach (GuildShakeRankItem item in RankManagerment.Instance.guildShakeList)
        {
            if (item.uid == UserManager.Instance.self.uid)
            {
                item.integral = integral;
                isExist       = true;
                break;
            }
        }
        if (!isExist)
        {
            GuildShakeRankItem item = new GuildShakeRankItem(UserManager.Instance.self.uid, UserManager.Instance.self.nickname, integral);
            RankManagerment.Instance.guildShakeList.Add(item);
        }
        GuildShakeRankItem [] rankArray = RankManagerment.Instance.guildShakeList.ToArray();
        SetKit.sort(rankArray, new ShakeRankInfoCompare());
        RankManagerment.Instance.guildShakeList.Clear();
        RankManagerment.Instance.guildShakeList.AddRange(rankArray);
        if (index == 0)
        {
            showIntegralRankContent();
        }
    }
 /* methods */
 /** 初始化 */
 public void init(WindowBase win, int type, bool showUseMount)
 {
     this.fatherWindow = win;
     bl = showUseMount;
     if (type == MountStoreContent.TAP_AGENRAL_CONTENT)
     {
         exlist = ExchangeManagerment.Instance.getAllExchangesMount(ExchangeType.MOUNT);
         if (showUseMount)
         {
             updateMountList(exlist);
         }
         exchangeList = exlist.ToArray();
         (fatherWindow as MountsWindow).setButtonState(MountStoreContent.SHOW_RIDE_MOUNT);
         SetKit.sort(exchangeList, comp);
         cleanAll();
         updateUI();
     }
     else if (type == MountStoreContent.TAP_BACTICE_CONTENT)
     {
         if (GuildManagerment.Instance.getGuild() != null)
         {
             MountsHaveGuildFPort fport = FPortManager.Instance.getFPort <MountsHaveGuildFPort> ();
             fport.initGuildIinfo(initConetnt);
         }
         else
         {
             initConetnt();
         }
     }
 }
Example #4
0
 /** 排序 */
 public void sort(Comparator comparator, bool descending)
 {
     if (comparator == null)
     {
         return;
     }
     object[] array = this.array;
     object[] temp  = new object[array.Length];
     Array.Copy(array, 0, temp, 0, array.Length);
     SetKit.sort(temp, comparator, descending);
     this.array = temp;
 }
 void initConetnt()
 {
     exlist = ExchangeManagerment.Instance.getAllExchangesMount(ExchangeType.BACTICMOUNT);
     if (bl)
     {
         updateMountList(exlist);
     }
     exchangeList = exlist.ToArray();
     (fatherWindow as MountsWindow).setButtonState(MountStoreContent.SHOW_RIDE_MOUNT);
     SetKit.sort(exchangeList, comp);
     cleanAll();
     updateUI();
 }
Example #6
0
 /** 奖励条目排序 */
 void SortAwardItem(List <GameObject> awardItem)
 {
     if (awardItem.Count <= 1)
     {
         return;
     }
     GameObject[] objs = awardItem.ToArray();
     SetKit.sort(objs, comp);
     awardItem.Clear();
     foreach (GameObject obj in objs)
     {
         awardItem.Add(obj);
     }
 }
Example #7
0
 /** 奖励条目排序 */
 void SortAwardItem()
 {
     if (awardList == null || awardList.Count <= 1)
     {
         return;
     }
     GameObject[] objs = awardList.ToArray();
     SetKit.sort(objs, comp);
     awardList.Clear();
     foreach (GameObject obj in objs)
     {
         awardList.Add(obj);
     }
 }
Example #8
0
 /** 竞猜集合排序 */
 public void SortFocusCuess()
 {
     if (focusCuessList.Count <= 1)
     {
         return;
     }
     FocusPointInfo[] infos = focusCuessList.ToArray();
     SetKit.sort(infos, comp);
     focusCuessList.Clear();
     foreach (FocusPointInfo info in infos)
     {
         focusCuessList.Add(info);
     }
 }
Example #9
0
 public void reLoad(ArrayList magics, int type)
 {
     magicWeaponList = magics;
     typee           = type;
     magicWeapons    = new MagicWeapon[magicWeaponList.Count];
     for (int i = 0; i < magicWeaponList.Count; i++)
     {
         magicWeapons[i] = magicWeaponList[i] as MagicWeapon;
     }
     //这里对秘宝进行排序
     if (type == MagicWeaponType.STRENG)
     {
         base.reLoad(magicWeaponList.Count);
         return;
     }
     SetKit.sort(magicWeapons, comp);
     base.reLoad(magicWeaponList.Count);
 }
Example #10
0
    /** 添加指定的对象 */
    public bool add(object obj)
    {
        object[] array = this.array;
        int      i     = array.Length;

        object[] temp = new object[i + 1];
        if (i > 0)
        {
            Array.Copy(array, 0, temp, 0, i);
        }
        temp[i] = obj;
        if (comparator != null)
        {
            SetKit.sort(temp, comparator, descending);
        }
        this.array = temp;
        return(true);
    }
Example #11
0
    /** 添加指定的对象数组 */
    public void add(object[] objs, int index, int length)
    {
        if (objs == null || index < 0 || length <= 0 || objs.Length < index + length)
        {
            return;
        }
        object[] array = this.array;
        int      i     = array.Length;

        object[] temp = new object[i + length];
        if (i > 0)
        {
            Array.Copy(array, 0, temp, 0, i);
        }
        Array.Copy(objs, index, temp, i, length);
        if (comparator != null)
        {
            SetKit.sort(temp, comparator, descending);
        }
        this.array = temp;
    }
Example #12
0
    /** 获取所有的模版 */
    public List <GuildFightAwardSample> getAllSample()
    {
        if (list.Count != 0)
        {
            return(list);
        }
        GuildFightAwardSample [] sampleArray = new GuildFightAwardSample[data.Count];
        int i = 0;

        foreach (DictionaryEntry entry in data)
        {
            GuildFightAwardSample sample = new GuildFightAwardSample();
            int    sid     = int.Parse(entry.Key.ToString());
            string dataStr = getSampleDataBySid(sid);
            sample.parse(sid, dataStr);
            sampleArray[i] = sample;
            ++i;
        }
        SetKit.sort(sampleArray, new GuildFightAwardSampleCompare());
        list.AddRange(sampleArray);
        return(list);
    }