Beispiel #1
0
    public void UpdateInfo()
    {
        COM_GuildBuilding guildBuild = FamilySystem.instance.Buildings [(int)GuildBuildingType.GBT_Collection - 1];

        if (guildBuild == null)
        {
            return;
        }
        FamilyData fData = FamilyData.GetData((int)GuildBuildingType.GBT_Collection, guildBuild.level_);

        if (fData == null)
        {
            return;
        }
        name.text           = fData.name_;
        levelImg.spriteName = "jz_" + guildBuild.level_;
        lv_.text            = guildBuild.level_.ToString();
        COM_Guild guild = FamilySystem.instance.GuildData;

        if (guild == null)
        {
            return;
        }
        cent_.text = guild.presentNum_ + "/" + fData.number_;

        progress_.value = (float)guild.presentNum_ / (float)fData.number_;

        ItemCellUI cell = UIManager.Instance.AddItemCellUI(rewardicon_, (uint)fData.rewrod_);

        cell.showTips = true;
    }
Beispiel #2
0
 static public void leaveMyGuild(string name)
 {
     if (name.Equals(GamePlayer.Instance.InstName))
     {
         mguild = new COM_Guild();
         isExt  = true;
         historyMessage.Clear();
     }
 }
Beispiel #3
0
 void RefreshFamilyInfo(COM_Guild guild)
 {
     if (guild == null)
     {
         return;
     }
     Guild = guild;
     UpdateApplyForMessage(guild.requestList_);
 }
Beispiel #4
0
 public static void DismissGuild()
 {
     mguild = new COM_Guild();
     isExt  = true;
     historyMessage.Clear();
     if (guildRequestDic_ != null)
     {
         guildRequestDic_.Clear();
     }
     MyFamilyInfo.HideMe();
 }
Beispiel #5
0
    void UpdateGuild(COM_Guild guild)
    {
        //GuildSystem.Mguild = guild;
        FamilyData fad = FamilyData.GetData((int)GuildBuildingType.GBT_Bank, (int)guild.buildings_[((int)GuildBuildingType.GBT_Bank) - 1].level_);

        fads                     = fad;
        levelLable.text          = guild.buildings_[((int)GuildBuildingType.GBT_Bank) - 1].level_.ToString();
        maxFamilyMoneyLable.text = fad.number_.ToString();
        levelSp.spriteName       = guild.buildings_[((int)GuildBuildingType.GBT_Bank) - 1].level_.ToString();
        weihuLable.text          = (GuildSystem.Mguild.buildings_[((int)GuildBuildingType.GBT_Main) - 1].level_ * weihu).ToString();
        curFamilyMoneyLable.text = guild.fundz_.ToString();
        moneyinput.value         = "";
        money                    = 0;
    }
Beispiel #6
0
    void Start()
    {
        UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0);
        UIManager.SetButtonEventHandler(battleBtn.gameObject, EnumButtonEvent.OnClick, OnClickBattle, 0, 0);
        COM_Guild guild = FamilySystem.instance.GuildData;

        if (guild == null)
        {
            return;
        }
        for (int i = 0; i < guild.progenitus_.Length; i++)
        {
            cellList[i].Monster = guild.progenitus_[i];
        }
    }
Beispiel #7
0
 public static void InitGuildData(COM_Guild guild)
 {
     if (mguild != null && mguild.master_ != guild.master_)
     {
         PopText.Instance.Show(LanguageManager.instance.GetValue("yijiaobangzhu").Replace("{n}", guild.masterName_));
     }
     mguild = guild;
     isExt  = false;
     GuildRequestDatas.Clear();
     GuildRequestDatas.AddRange(guild.requestList_);
     if (InitGuildDataOk != null)
     {
         InitGuildDataOk(guild);
     }
 }
Beispiel #8
0
    private int GetNullPos()
    {
        COM_Guild guild = FamilySystem.instance.GuildData;

        if (guild == null)
        {
            return(-1);
        }
        for (int i = 0; i < guild.progenitusPositions_.Length; i++)
        {
            if (guild.progenitusPositions_[i] == 0)
            {
                return(i);
            }
        }

        return(-1);
    }
Beispiel #9
0
    private void OnClickPosIcon(ButtonScript obj, object args, int param1, int param2)
    {
        return;

        COM_Guild guild = FamilySystem.instance.GuildData;

        if (guild == null)
        {
            return;
        }
        if (guild.progenitusPositions_ [param1] == 0)
        {
            return;
        }
        else
        {
            NetConnection.Instance.setProgenitusPosition(0, param1);
        }
    }
Beispiel #10
0
    static public void Clear()
    {
        shopitems.Clear();
        VicePremiers.Clear();
        GuildMembers.Clear();
        historyMessage.Clear();
        if (guildRequestDic_ != null)
        {
            foreach (bool [] t in guildRequestDic_.Values)
            {
                for (int i = 0; i < t.Length; i++)
                {
                    t[i] = false;
                }
            }
        }

        //curGuildBattle = null;
        mguild = null;
    }
Beispiel #11
0
    void Start()
    {
        UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0);
        FamilySystem.instance.ProgenPosEvent += new RequestEventHandler <int[]> (OnProgenPosEvent);
        COM_Guild guild = FamilySystem.instance.GuildData;

        if (guild == null)
        {
            return;
        }
        for (int i = 0; i < guild.progenitus_.Length; i++)
        {
            cellList[i].Monster = guild.progenitus_[i];
        }

        for (int i = 0; i < cellList.Count; i++)
        {
            UIManager.SetButtonEventHandler(cellList[i].gameObject, EnumButtonEvent.OnClick, OnClickCell, cellList[i].Monster.mId_, 0);
        }

        for (int i = 0; i < iconBack.Count; i++)
        {
            UIManager.SetButtonEventHandler(iconBack[i].gameObject, EnumButtonEvent.OnClick, OnClickPosIcon, i, 0);
        }

        for (int j = 0; j < guild.progenitusPositions_.Length; j++)
        {
            if (guild.progenitusPositions_[j] != 0)
            {
                icon[j].gameObject.SetActive(true);
                HeadIconLoader.Instance.LoadIcon(familyMonsterData.GetData(guild.progenitusPositions_[j], 1)._Icon, icon[j]);
            }
            else
            {
                icon[j].gameObject.SetActive(false);
            }
        }
    }