Beispiel #1
0
    void UpdateMoneyInfo()
    {
        int resourceId = mShopTemplate.getCostType();

        moneyIcon.sprite = GameUtils.GetSpriteByResourceType(resourceId);
        moneyIcon.SetNativeSize();
        long count = -1;

        if (ObjectSelf.GetInstance().TryGetResourceCountById(resourceId, ref count))
        {
            moneyTxt.text = count.ToString();
        }

        costImg.sprite = GameUtils.GetSpriteByResourceType(resourceId);
        int  buyTimes   = ObjectSelf.GetInstance().GetShopBuyInfoByShopId(mShopTemplate.getId()).todaynum;
        bool isDiscount = ShopModule.IsShopItemInDiscount(mShopTemplate);

        costTxt.text = DataTemplate.GetInstance().GetShopBuyCost(mShopTemplate, buyTimes, isDiscount).ToString();
    }
Beispiel #2
0
    protected override void OnClickBuyOneBtn()
    {
        if (ObjectSelf.GetInstance().ishavefree == 0)
        {
            m_CurFlag = CLotteryItem.FREE;
            SendMessage();
            return;
        }

        // 金币不足
        if (TipsGoldValue(DataTemplate.GetInstance().m_GameConfig.getTreasure_single_cost()))
        {
            return;
        }

        m_CurFlag = CLotteryItem.ONE;

        SendMessage();
    }
    //升品按钮回调
    private void onQualityProBtnClick()
    {
        m_PrevCard = new ObjectCard();
        m_PrevCard.GetHeroData().Copy(this.m_Card.GetHeroData());

        if (ObjectSelf.GetInstance().Money >= m_HeroT.getGold() &&
            m_HeroT.getStageUpTargetID() != -1 &&
            m_HeroT.getStuff() > 0 &&
            InterfaceControler.GetInst().ReturnItemCount(m_HeroT.getStuff()) >= m_HeroT.getNumbers())
        {
            CStarUpHero csh = new CStarUpHero();
            csh.herokey = (int)m_Card.GetGuid().GUID_value;
            IOControler.GetInstance().SendProtocol(csh);
        }
        else
        {
            InterfaceControler.GetInst().AddMsgBox(GameUtils.getString("ui_yingxiongqianghua_shengji6"), transform);
        }
    }
Beispiel #4
0
    /// <summary>
    /// 获得最大购买次数---注意不会有阶梯价格的物品;
    /// </summary>
    /// <param name="shopId"></param>
    /// <param name="perPrice"></param>
    /// <returns></returns>
    public static int GetMaxBuyCount(int shopId, int perPrice)
    {
        ShopTemplate ShopT = DataTemplate.GetInstance().GetShopTemplateByID(shopId);

        if (ShopT == null)
        {
            LogManager.LogError("ShopTemplate is null id=" + shopId);
            return(-1);
        }

        List <int> times = new List <int>();
        //-----根据人物当前资源最大购买次数--------
        int  countByMoney = -1;
        long count        = -1;

        if (ObjectSelf.GetInstance().TryGetResourceCountById(ShopT.getCostType(), ref count))
        {
            countByMoney = (int)(count / perPrice);
            times.Add(countByMoney);
        }

        int     vipLv = ObjectSelf.GetInstance().VipLevel;
        Shopbuy sb    = ObjectSelf.GetInstance().GetShopBuyInfoByShopId(ShopT.getId());
        //-----根据人物当前vip每日限购最大购买次数--
        int countByDaily = -1;
        //-----根据人物当前vip总限购最大购买次数----
        int countByTotal = -1;

        if (IsShopBuyLimited(ShopT))
        {
            countByDaily = DataTemplate.GetInstance().GetShopItemDailyBuyTimes(ShopT, vipLv) - sb.todaynum;
            countByTotal = DataTemplate.GetInstance().GetShopItemDailyBuyTimes(ShopT, vipLv) - sb.buyallnum;

            times.Add(countByDaily);
            times.Add(countByTotal);
        }

        //默认最大购买次数;
        times.Add(999);

        return(Mathf.Max(0, Mathf.Min(times.ToArray())));
    }
Beispiel #5
0
    private int m_NightNum;                         //晚上是否领取 1为领取 0为未领取
    public override void InitUIData()
    {
        base.InitUIData();
        _instance                 = this;
        m_TimeNow                 = new TimeInfoHM();
        m_severTime               = ObjectSelf.GetInstance().ServerTime + (int)Time.time;
        m_TimeNoonMin             = new TimeInfoHM();
        m_TimeNoonMin.hour        = 12;
        m_TimeNoonMin.minute      = 0;
        m_TimeNoonMax             = new TimeInfoHM();
        m_TimeNoonMax.hour        = 13;
        m_TimeNoonMax.minute      = 0;
        m_TimeNightMin            = new TimeInfoHM();
        m_TimeNightMin.hour       = 18;
        m_TimeNightMin.minute     = 0;
        m_TimeNightMax            = new TimeInfoHM();
        m_TimeNightMax.hour       = 19;
        m_TimeNightMax.minute     = 0;
        m_TimeMadrugadaMin        = new TimeInfoHM();
        m_TimeMadrugadaMin.hour   = 0;
        m_TimeMadrugadaMin.minute = 0;
        m_TimeMadrugadaMax        = new TimeInfoHM();
        m_TimeMadrugadaMax.hour   = 23;
        m_TimeMadrugadaMax.minute = 59;
        string[] _Time = DataTemplate.GetInstance().m_GameConfig.getAp_get_time();
        m_NoontimeDes.text = _Time[0];
        m_NightDes.text    = _Time[1];
        InvokeRepeating("GetServerTime", 0, 1);
        InvokeRepeating("RenewalUIShow", 0, 1);

        UI_CaptionManager cap = UI_CaptionManager.GetInstance();

        if (cap != null)
        {
            cap.AwakeUp(M_CapPos);
        }

        m_Name.text         = GameUtils.getString("muse_music_title");
        m_GetPowerText.text = GameUtils.getString("muse_music_content5");

        GameEventDispatcher.Inst.addEventListener(GameEventID.UI_GetPower, GetPowerTip);
    }
        /// <summary>
        /// 英雄列表排序
        /// </summary>
        private void HeroListSort()
        {
            tempList = new List <ObjectCard>();
            List <ObjectCard> temp        = new List <ObjectCard>();
            List <ObjectCard> objCardList = ObjectSelf.GetInstance().HeroContainerBag.GetYetFormList(ref temp);

            objCardList.Sort(new HeroComparer());
            for (int i = 0; i < objCardList.Count; i++)
            {
                tempList.Add(objCardList[i]);
            }

            temp.Sort(new HeroComparer());
            for (int i = 0; i < temp.Count; i++)
            {
                tempList.Add(temp[i]);
            }

            TranHeroList(tempList);
        }
        public override void InitUIView()
        {
            CurtPageCount = 9;
            CurtRowCount  = 3;

            InitHeroBagCount();
            int getcount   = ObjectSelf.GetInstance().HeroContainerBag.GetHeroList().Count;
            int nogetcount = noGetHeros.Count;

            if (getcount % _gridLayout.columns != 0)
            {
                getcount = (getcount / _gridLayout.columns + 1) * _gridLayout.columns;
            }

            _gridLayout.cellCount        = getcount + nogetcount;
            _gridLayout.SeparatorIndex   = getcount;
            _gridLayout.updateCellEvent += UpdateHeroItem;
            _gridLayout.Reload();
            //GameEventDispatcher.Inst.dispatchEvent(GameEventID.U_HeroChangeTarget, m_SelectCard);
        }
Beispiel #8
0
    //public OwnGodSoul temp = new OwnGodSoul();
    private void InitGodSoulUI()
    {
        Team team = ObjectSelf.GetInstance().Teams;

        mSouelId1 = team.m_GodSoulID1;
        mSouelId2 = team.m_GodSoulID2;
        mSouelId3 = team.m_GodSoulID3;
        mSouelId4 = team.m_GodSoulID4;

        Transform         soulPanelTrans = selfTransform.FindChild("SoulPanel");
        UI_GodSoulItemBtn ui_GodSoul1    = soulPanelTrans.GetChild(0).GetComponent <UI_GodSoulItemBtn>();
        UI_GodSoulItemBtn ui_GodSoul2    = soulPanelTrans.GetChild(1).GetComponent <UI_GodSoulItemBtn>();
        UI_GodSoulItemBtn ui_GodSoul3    = soulPanelTrans.GetChild(2).GetComponent <UI_GodSoulItemBtn>();
        UI_GodSoulItemBtn ui_GodSoul4    = soulPanelTrans.GetChild(3).GetComponent <UI_GodSoulItemBtn>();

        ui_GodSoul1.InitShowData(mSouelId1, 6);
        ui_GodSoul2.InitShowData(mSouelId2, 7);
        ui_GodSoul3.InitShowData(mSouelId3, 8);
        ui_GodSoul4.InitShowData(mSouelId4, 9);
    }
 /// <summary>
 /// 资源栏显示
 /// </summary>
 public void TopShow()
 {
     mMoney.text = ObjectSelf.GetInstance().Money.ToString();
     item        = ObjectSelf.GetInstance().CommonItemContainer.SortCommonItemByType(EM_SORT_COMMON_ITEM.EM_SORT_COMMON_ITEM_ALL);
     mZiyuan1Num = 0;
     mZiyuan2Num = 0;
     for (int i = 0; i < item.Count; i++)
     {
         if (item[i].GetItemTableID() == 1402010005)
         {
             mZiyuan1Num += item[i].GetItemCount();
         }
         if (item[i].GetItemTableID() == 1402010006)
         {
             mZiyuan2Num += item[i].GetItemCount();
         }
     }
     mZiyuan1.text = mZiyuan1Num.ToString();
     mZiyuan2.text = mZiyuan2Num.ToString();
 }
Beispiel #10
0
    /// <summary>
    /// 获得当前开放的最后章节id;
    /// </summary>
    /// <returns></returns>
    public static int GetPlayerLastChapterID()
    {
        Dictionary <int, BattleStage> stags = ObjectSelf.GetInstance().BattleStageData.GetBattleDatas();

        int count = 0;

        foreach (var item in stags)
        {
            if (item.Key > 1000)
            {
                continue;
            }
            else
            {
                count++;
            }
        }

        return(count);
    }
Beispiel #11
0
        public override void Process()
        {
            BattleStageMgr pStageData = ObjectSelf.GetInstance().BattleStageData;

            LogManager.LogToFile("start chapter ...");
            foreach (StageInfo item in stages)
            {
                LogManager.LogToFile("start chapter  : " + item.id);
                if (pStageData.m_BattleStageList.ContainsKey(item.id))
                {
                    //初始化关卡数据的章节ID不能重复 [4/7/2015 Zmy]
                    continue;
                    //LogManager.LogError("!!!!!!!!!Error:Init Stages Picec Data Key repeat");
                }
                else
                {
                    pStageData.CopyBattleStageData(item);
                }
            }
        }
Beispiel #12
0
 /// <summary>
 /// 更新UI显示
 /// </summary>
 public void UpdateShowUI()
 {
     m_Text.text = GameUtils.getString("prayer_content3");
     ObjectSelf m_info = ObjectSelf.GetInstance();
     StringBuilder str = new StringBuilder();
     str.Append("<color=#ffff00>" + m_info.SacredAltarNum + "</color>");
     str.Append("/");
     str.Append( m_info.ScaredAltarNumMax);
     m_SacredAltarNum.text = str.ToString();
     int _TypeNum = m_info.ScaredAltarTypeNum;
     m_isSacredAltar = _TypeNum % 10;
     if (m_isSacredAltar == 1)
     {
         GameUtils.SetBtnSpriteGrayState(m_SacredAltarBtn, true);
     }
     else
     {
         GameUtils.SetBtnSpriteGrayState(m_SacredAltarBtn, false);
     }
 }
Beispiel #13
0
    /// <summary>
    /// 没有三星通关-----扫荡前提;
    /// </summary>
    /// <returns></returns>
    public bool RefreshStateInfo()
    {
        bool        result = true;
        ObjectSelf  obj    = ObjectSelf.GetInstance();
        BattleStage stage  = null;

        if (obj.GetIsPrompt())
        {
            stage = obj.BattleStageData.m_BattleStageList[1001];
        }
        else
        {
            stage = obj.BattleStageData.m_BattleStageList[obj.GetCurChapterID()];
        }
        StageData stageData = stage.GetStageData(obj.CurStageID);

        result = stageData == null || stageData.m_StageStar < 3;

        return(result);
    }
Beispiel #14
0
    public override void OnClickWipeOutOneBtn()
    {
        base.OnClickWipeOutOneBtn();

        ObjectSelf obj = ObjectSelf.GetInstance();

        if (obj == null)
        {
            return;
        }

        //没3星通关;
        if (RefreshStateInfo())
        {
            InterfaceControler.GetInst().AddMsgBox(GameUtils.getString("UI_raids_tips1"), selfTransform);
            return;
        }

        WipeOutHandler(1);
    }
Beispiel #15
0
    public void OnClickBtn()
    {
        ObjectSelf obj = ObjectSelf.GetInstance();

        if (itemNum > obj.CommonItemContainer.GetBagItemSizeMax() - obj.CommonItemContainer.GetBagItemSum())
        {
            //UI_Liveness._instance.IsItemBagMax();
        }
        if (heroNum > obj.HeroContainerBag.GetHeroBagSizeMax() - obj.HeroContainerBag.GetHeroList().Count)
        {
            //UI_Liveness._instance.IsHeroBagMax();
        }
        if (itm.canOpen())
        {
            CGetHuoYueBox cBox = new CGetHuoYueBox();
            cBox.boxnum = itm.Index + 1;
            IOControler.GetInstance().SendProtocol(cBox);
        }
        this.gameObject.SetActive(false);
    }
Beispiel #16
0
    void DisplayNormal()
    {
        mDifficutType = EM_STAGE_DIFFICULTTYPE.NORMAL;
        mCurLevelId   = StageModule.GetPlayerLastLevelID(mDifficutType);
        if (mCurLevelId == -1)
        {
            mCurLevelId = 1310101000;
        }
        //最后一个章节;
        mCurChapterId = StageModule.GetPlayerLastChapterID();
        if (mCurChapterId <= 0)
        {
            mCurChapterId = 1;
        }

        ObjectSelf.GetInstance().CurStageID = mCurLevelId;

        InitLevelId   = mCurLevelId;
        InitChapterId = mCurChapterId;
    }
Beispiel #17
0
    void OnLevelChanged(int levelId)
    {
        ChapterinfoTemplate chapterT = StageModule.GetChapterinfoTemplateById(mCurChapterId);

        if (chapterT == null)
        {
            Debug.LogError("章节数据错误id=" + mCurChapterId);
            return;
        }

        ObjectSelf.GetInstance().CurStageID = mCurLevelId;
        ObjectSelf.GetInstance().SetCurCampaignID(mCurLevelId);

        //--------------------- 关卡详细描述-------------------
        UpdateLevelInfo();

        ////---------------------所有关卡-----------------------
        //UpdateLevels(chapterT);
        UpdateSelectState();
    }
Beispiel #18
0
    /// <summary>
    /// 创建商店Item
    /// </summary>
    private void CreateStoreItem()
    {
        ClearStoreOBJ();
        List <BaseStore> storeList = ObjectSelf.GetInstance().StoreContainer.GetStoreList();

        for (int i = 0; i < storeList.Count; i++)
        {
            BaseStore store = storeList[i];
            if (store.GetStoreRow().getWhetherDisplay() == 1)
            {
                GameObject go = Instantiate(m_Prefab) as GameObject;
                go.transform.parent        = m_Grid;
                go.transform.localPosition = Vector3.zero;
                go.transform.localScale    = Vector3.one;

                UI_StoreItem uiStoreItem = go.GetComponent <UI_StoreItem>();
                uiStoreItem.InitItemData(store);
            }
        }
    }
Beispiel #19
0
    public void ReceiveListData()
    {
        //得到服务器列表数据;

        MailListData = ObjectSelf.GetInstance().GetManager().m_MailList;
        MailItemSort(ref MailListData);
        if (MailListData.Count == 0)
        {
            HaveMail.SetActive(false);
            NoMail.SetActive(true);
        }
        else
        {
            NoMail.SetActive(false);
            HaveMail.SetActive(true);
            CreatListItem();
        }

        EmailTotalNumText.text = ObjectSelf.GetInstance().GetManager().mailallsize.ToString();//邮件总数
    }
Beispiel #20
0
    public void ShowInfo()
    {
        _rune = (ItemTemplate)DataTemplate.GetInstance().m_ItemTable.getTableData(tableID);
        //_icon.overrideSprite = UIResourceMgr.LoadSprite(common.defaultPath + _rune.getIcon());
        //_icon.SetNativeSize();
        _data = (ItemEquip)ObjectSelf.GetInstance().CommonItemContainer.FindItem(EM_BAG_HASHTABLE_TYPE.EM_BAG_HASHTABLE_TYPE_EQUIP, guid);
        //_level.text = "+" + _data.GetStrenghLevel().ToString();

        //int level = _rune.getRune_quality();
        //for (int i = 0; i < level; i++)
        //{
        //    _starLevel.transform.GetChild(i).gameObject.SetActive(true);
        //}

        SetIcon(common.defaultPath + _rune.getIcon());
        SetRuneType(_rune.getRune_type());
        //SetIsSpecial(_rune.getRune_type() == 5 || _rune.getRune_type() == 6);
        SetIsSpecial(RuneModule.IsSpecialRune(_rune));
        SetStarsNum(_rune.getRune_quality());
    }
Beispiel #21
0
    public void SetData(int itemid)
    {
        ItemTemplate itemT = DataTemplate.GetInstance().GetItemTemplateById(itemid);

        if (itemT == null)
        {
            return;
        }

        PropsaccessTemplate propsT = UICommonModule.GetPropsacessTemplateByItemId(itemid);

        if (propsT == null)
        {
            return;
        }

        iconImg.sprite = UIResourceMgr.LoadSprite(common.defaultPath + itemT.getIcon_s());
        m_Name.text    = GameUtils.getString(itemT.getName());

        //TODO::这里应该区分物品类型,进而去不同背包获得物品数量;
        int count = 0;

        if (ObjectSelf.GetInstance().TryGetItemCountById(EM_BAG_HASHTABLE_TYPE.EM_BAG_HASHTABLE_TYPE_COMMON, itemid, ref count))
        {
        }
        else
        {
            count = 0;
        }
        m_Value.text = count.ToString();

        m_detail.text = GameUtils.getString(itemT.getDes());

        ClearItems();

        GenerateGetItem(propsT.getIcon1(), propsT.getTextcomment1(), propsT.getAccessType1(), propsT.getAccessThing1());
        GenerateGetItem(propsT.getIcon2(), propsT.getTextcomment2(), propsT.getAccessType2(), propsT.getAccessThing2());
        GenerateGetItem(propsT.getIcon3(), propsT.getTextcomment3(), propsT.getAccessType3(), propsT.getAccessThing3());
        GenerateGetItem(propsT.getIcon4(), propsT.getTextcomment4(), propsT.getAccessType4(), propsT.getAccessThing4());
        GenerateGetItem(propsT.getIcon5(), propsT.getTextcomment5(), propsT.getAccessType5(), propsT.getAccessThing5());
    }
Beispiel #22
0
    private bool IsEnoughRp(ObjectCreature value)
    {
        switch (m_pTableRowSpell.getRpConditionType())
        {
        case (int)EM_SPELL_CONDITION_TYPE.EM_SPELL_CONDITION_TYPE_INVALID:
            return(true);

        case (int)EM_SPELL_CONDITION_TYPE.EM_SPELL_CONDITION_TYPE_LESSVALUE:
            if (FightControler.Inst.GetPowerValue(value.GetGroupType()) <= m_pTableRowSpell.getRpConditionNum())
            {
                return(true);
            }
            break;

        case (int)EM_SPELL_CONDITION_TYPE.EM_SPELL_CONDITION_TYPE_MOREVALUE:
            if (ObjectSelf.GetInstance().isSkillShow)
            {
                return(true);
            }
            else if (FightControler.Inst.GetPowerValue(value.GetGroupType()) >= m_pTableRowSpell.getRpConditionNum())
            {
                return(true);
            }
            break;

        case (int)EM_SPELL_CONDITION_TYPE.EM_SPELL_CONDITION_TYPE_LESSPERCENT:
            if ((FightControler.Inst.GetPowerValue(value.GetGroupType()) / ObjectSelf.GetInstance().GetMaxPowerValue()) <= (m_pTableRowSpell.getRpConditionNum() / 100))
            {
                return(true);
            }
            break;

        case (int)EM_SPELL_CONDITION_TYPE.EM_SPELL_CONDITION_TYPE_MOREPERCENT:
            if ((FightControler.Inst.GetPowerValue(value.GetGroupType()) / ObjectSelf.GetInstance().GetMaxPowerValue()) >= (m_pTableRowSpell.getRpConditionNum() / 100))
            {
                return(true);
            }
            break;
        }
        return(false);
    }
Beispiel #23
0
        public override void Process()
        {
            if (result == END_ERROR)
            {
            }
            else
            {
                ObjectSelf.GetInstance().LimitFightMgr.m_AttrAdd1 = add1;
                ObjectSelf.GetInstance().LimitFightMgr.m_AttrAdd2 = add2;
                ObjectSelf.GetInstance().LimitFightMgr.m_AttrAdd3 = add3;
                if (ObjectSelf.GetInstance().LimitFightMgr.m_AttrAdd4 < add4)
                {
                    ObjectSelf.GetInstance().LimitFightMgr.m_AttrAdd4 = add4;
                    SceneObjectManager.GetInstance().OnHealAllHero();
                }


                UI_LimitFight.isBuy = true;
                GameEventDispatcher.Inst.dispatchEvent(GameEventID.F_LimitAddEnd);
            }
        }
Beispiel #24
0
    bool TipsDreamValue()
    {
        // 提示梦想值已满
        int dreamValue = DataTemplate.GetInstance().m_GameConfig.getDream_need_value();

        if (ObjectSelf.GetInstance().dreamexp >= dreamValue && ObjectSelf.GetInstance().isTipsDream)
        {
            ObjectSelf.GetInstance().isTipsDream = false;

            UI_RechargeBox box = UI_HomeControler.Inst.AddUI(UI_RechargeBox.UI_ResPath).GetComponent <UI_RechargeBox>();
            box.SetIsNeedDescription(false);
            box.SetDescription_text(GameUtils.getString("hero_recruit_bubble1"));
            box.SetLeftBtn_text(GameUtils.getString("common_button_ok"));
            box.SetLeftClick(OnClickConfirmBtn);
            box.SetRightBtn_text(GameUtils.getString("common_button_cancel"));
            box.SetRightClick(OnClickCancelBtn);

            return(true);
        }
        return(false);
    }
Beispiel #25
0
 private void ImageQualityShow()
 {
     m_TypeText.text      = GameUtils.getString("System_setting_content6");
     m_LeftButText.text   = GameUtils.getString("System_setting_content11");
     m_MiddleButText.text = GameUtils.getString("System_setting_content12");
     m_RightButText.text  = GameUtils.getString("System_setting_content13");
     if (ObjectSelf.GetInstance().GetSettingData().m_ImageQuality == 6)
     {
         LeftSelect();
         MiddleNoSelect();
     }
     if (ObjectSelf.GetInstance().GetSettingData().m_ImageQuality == 10000)
     {
         MiddleSelect();
     }
     if (ObjectSelf.GetInstance().GetSettingData().m_ImageQuality == 7)
     {
         RightSelect();
         MiddleNoSelect();
     }
 }
Beispiel #26
0
    public void ShowAllProperty()
    {
        if (obj == null)
        {
            return;
        }

        int all = ObjectSelf.GetInstance().HeroMoney;

        allHeroMoney.text = all.ToString();
        hero = obj.GetHeroRow();
        EnabledBtn();
        ShowProperty1();
        ShowProperty2();
        ShowProperty3();
        ShowProperty4();
        //texiao1.SetActive(false);
        //texiao2.SetActive(false);
        //texiao3.SetActive(false);
        //texiao4.SetActive(false);
    }
    public override void InitUIView()
    {
        base.InitUIView();

        string ServerName = UI_LoginWin.curServerName;

        if (ServerName != string.Empty)
        {
            string[] _str = ServerName.Split('#');
            if (_str.Length >= 2)
            {
                _ServerTxt.text = "  " + _str[0] + "   " + _str[1];
            }
        }
        m_UidTxt.text = ObjectSelf.GetInstance().Guid.GUID_value.ToString("X");
        m_UidStr.text = GameUtils.getString("UID");
        InvokeRepeating("GetServerTime", 0, 1);
        ShowHeroCounum();
        ShowItemConnum();
        ShoweExbar();
    }
Beispiel #28
0
    void UpdateInfo()
    {
        int curExplorePoint = ObjectSelf.GetInstance().ExplorePoint;
        int maxExplorePoint = ObjectSelf.GetInstance().ExplorePointMax;

        ExplorePointTxtCur.text   = curExplorePoint.ToString();
        ExplorePointTxtTotal.text = "/" + maxExplorePoint.ToString();

        if (curExplorePoint >= 200)
        {
            ExplorePointTxtCur.color = Color.red;
        }
        else if (curExplorePoint >= maxExplorePoint)
        {
            ExplorePointTxtCur.color = Color.yellow;
        }
        else
        {
            ExplorePointTxtCur.color = Color.white;
        }
    }
Beispiel #29
0
    /// <summary>
    /// 返回已上阵的英雄列表 and 未上阵的英雄列表
    /// </summary>
    /// <param name="_list">未上阵的英雄列表</param>
    /// <returns></returns>
    public List <ObjectCard> GetYetFormList(ref List <ObjectCard> _list)
    {
        _list.Clear();
        int idx = 0;
        List <ObjectCard> tempList = new List <ObjectCard>();

        for (int i = 0; i < m_HeroList.Count; i++)
        {
            ObjectCard card = m_HeroList[i];
            if (ObjectSelf.GetInstance().Teams.IsHeroInTeam(card.GetGuid(), ref idx))
            {
                tempList.Add(card);
            }
            else
            {
                _list.Add(card);
            }
        }

        return(tempList);
    }
Beispiel #30
0
        //第三步初始化显示对象 [1/19/2015 Zmy]
        protected override void InitView()
        {
            InitEditObject();
            InitUIObject();
            //InitHeroObject();

            //等待编辑器初始化完成 [1/20/2015 Zmy]

            if (ObjectSelf.GetInstance().LimitFightMgr.Activate || ObjectSelf.GetInstance().GetIsPrompt())
            {
                AudioControler.Inst.PlayMusic(m_Battle2Audio);
            }
            else if (ObjectSelf.GetInstance().WorldBossMgr.m_bStartEnter)
            {
                AudioControler.Inst.PlayMusic(m_BossAudio);
            }
            else
            {
                AudioControler.Inst.PlayMusic(m_Battle1Audio);
            }
        }