示例#1
0
    int GetWorldParam(ENWorldParamIndex index, out string name)
    {
        WorldParamInfo info = GameTable.WorldParamTableAsset.Lookup((int)index);

        name = info.StringTypeValue;
        return(info.IntTypeValue);
    }
示例#2
0
    public void OnRight(GameObject obj)
    {
        WorldParamInfo worldInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enCreatCardList);

        if (null == worldInfo)
        {
            return;
        }

        List <int> cardList = StringToList(worldInfo.StringTypeValue);

        if (null == cardList)
        {
            return;
        }

        int index = cardList.IndexOf(Login.Singleton.m_curCardId);

        index = index + 1;

        if (index >= cardList.Count)
        {
            index = 0;
        }

        UpdateCardInfo(cardList[index]);
    }
示例#3
0
    //设置友情点数按钮显示
    void SetFriendShipText()
    {
        int friendPoint = User.Singleton.UserProps.GetProperty_Int32(UserProperty.friendship_point);

        m_friendShipNum.text = string.Format(Localization.Get("CurrentFriendshipPoints"), friendPoint);
        WorldParamInfo param = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enFrinendShipRecruitmentNum);

        if (friendPoint < param.IntTypeValue)
        {
            m_friendRecruitmentMoreButton.gameObject.SetActive(false);
            m_friendRecruitmentOnceButton.isEnabled = false;
        }
        else if (friendPoint >= param.IntTypeValue && (friendPoint < (param.IntTypeValue * 2)))
        {
            m_friendRecruitmentOnceButton.isEnabled = true;
            m_friendRecruitmentMoreButton.gameObject.SetActive(false);
        }
        else
        {
            m_friendRecruitmentOnceButton.isEnabled = true;
            m_friendRecruitmentMoreButton.gameObject.SetActive(true);
        }
        //显示多次招募正确文字
        int friendCount = friendPoint / param.IntTypeValue;

        param                   = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enRecruitTimesMax);
        friendCount             = (friendCount > param.IntTypeValue) ? param.IntTypeValue : friendCount;
        m_moreFriendRecruitment = friendCount;
        m_friendShipText.text   = string.Format(Localization.Get("RecruitTimes"), friendCount);
    }
示例#4
0
    //获得友情点数 可购买卡牌次数
    public int GetFriendShipBuyNum()
    {
        int            friendPoint = User.Singleton.UserProps.GetProperty_Int32(UserProperty.friendship_point);
        WorldParamInfo param       = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enFrinendShipRecruitmentNum);

        return(friendPoint / param.IntTypeValue);
    }
示例#5
0
    //  初始化 选择角色卡牌列表
    public void InitCardList()
    {
        WorldParamInfo worldInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enCreatCardList);

        if (null == worldInfo)
        {
            return;
        }

        List <int> cardList = StringToList(worldInfo.StringTypeValue);

        if (null == cardList)
        {
            Debug.Log("InitCardList null == cardList");
            return;
        }
        if (cardList.Count == 0)
        {
            Debug.Log("UIChooseCard InitCardList cardList为空 !");
            return;
        }

        foreach (int cardId in cardList)
        {
            NewCard(cardId);
        }

        m_grid.Reposition();
        RefreshJoystickAutoMap();
    }
示例#6
0
 //清空素材列表
 void ResetMaterialList()
 {
     foreach (UICardHead item in m_materialList)
     {
         item.Destroy();
     }
     m_materialList.Clear();
     if (null != m_cardBeforHead)
     {
         m_cardBeforHead.Destroy();
         m_cardBeforHead = null;
     }
     if (null != m_cardAfterHead)
     {
         m_cardAfterHead.Destroy();
         m_cardAfterHead = null;
     }
     foreach (var item in m_modelDataList)
     {
         UIManager.Singleton.HideModel(item.m_obj as GameObject);
     }
     m_modelDataList.Clear();
     foreach (UISprite item in m_materialSpritList)
     {
         Transform labelTransform = item.transform.Find("MateriaLabel");
         labelTransform.gameObject.SetActive(false);
         Transform      texure    = item.transform.Find("Sprite");
         WorldParamInfo worldInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enCardDivisionNullMaterialIcon);
         IconInfomation imageInfo = GameTable.IconInfoTableAsset.Lookup(worldInfo.IntTypeValue);
         texure.GetComponent <UITexture>().mainTexture = PoolManager.Singleton.LoadIcon <Texture>(imageInfo.dirName);
         Transform Startexure = item.transform.Find("Texture");
         Startexure.gameObject.SetActive(false);
         item.GetComponent <Parma>().m_type = 0;
     }
 }
示例#7
0
    // 显示连接失败的 二次弹框
    public void ShowConFailed()
    {
        Loading.Singleton.m_conFailedNum++;
        UICommonMsgBoxCfg boxCfg = WindowRoot.transform.GetComponent <UICommonMsgBoxCfg>();

        // 如果是战斗状态下
        if (MainGame.Singleton.CurrentState is StateBattle)
        {
            boxCfg.buttonNum = 1;

            // 如果提示次数到上限 则  出现两个按钮
            WorldParamInfo wordParmInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enConTimeOutCounts);

            if (wordParmInfo != null && Loading.Singleton.m_conFailedNum > wordParmInfo.IntTypeValue)
            {
                boxCfg.buttonNum = 2;
            }
        }

        UICommonMsgBox.GetInstance().ShowMsgBox(OnYesClicked, OnNoClicked, boxCfg);

        string buyText = Localization.Get("ConFailed");

        UICommonMsgBox.GetInstance().GetMainText().SetText(buyText);

        HideWindow();
    }
示例#8
0
    public CardBag()
    {
        SetPropertyObjectID((int)MVCPropertyID.enCardBag);

        //m_raceSelected                  = new List<int>();

        //m_occSelected                   = new List<int>();

        WorldParamInfo worldParamInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enCardBagID);

        if (null == worldParamInfo)
        {
            return;
        }

        BagInfo bagInfo = GameTable.BagTableAsset.LookUp(worldParamInfo.IntTypeValue);

        if (null == bagInfo)
        {
            return;
        }


        m_bagTableInfo = bagInfo;

        InitSortString();
    }
示例#9
0
    void OnButtonOK(GameObject obj)
    {
        bool isShowCommonMsgBox = false;

        CSItem card = CardBag.Singleton.GetCardByGuid(CardEvolution.Singleton.m_curEvolutionGuid);

        if (null == card)
        {
            Debug.Log("UICardEvolution card == null card:" + CardEvolution.Singleton.m_curEvolutionGuid);
            return;
        }
        HeroInfo info = GameTable.HeroInfoTableAsset.Lookup(card.IDInTable);

        if (null == info)
        {
            Debug.Log("UICardEvolution HeroInfo == null card.m_id:" + card.IDInTable);
            return;
        }
        Dictionary <int, int> evolveCardList = new Dictionary <int, int>();

        foreach (var cardID in info.EvolveCardList)
        {
            if (evolveCardList.ContainsKey(cardID))
            {
                ++evolveCardList[cardID];
            }
            else
            {
                evolveCardList.Add(cardID, 1);
            }
        }
        //判断素材卡里是否有稀有素材 如果有 则弹出二次确认框
        foreach (KeyValuePair <int, int> item in evolveCardList)
        {
            WorldParamInfo worldInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enCardDivisionMaterialStarLevel);
            HeroInfo       heroInfo  = GameTable.HeroInfoTableAsset.Lookup(item.Value);
            if (null != heroInfo && worldInfo.IntTypeValue <= heroInfo.Rarity)
            {
                isShowCommonMsgBox = true;
            }
        }
        if (isShowCommonMsgBox)
        {
            UICommonMsgBoxCfg boxCfg = m_buttonOk.transform.GetComponent <UICommonMsgBoxCfg>();
            UICommonMsgBox.GetInstance().ShowMsgBox(OnCardEvolutionOK, OnCardEvolutionNO, boxCfg);
            string formulaText = Localization.Get("WarningOfTheMaterial");
            UICommonMsgBox.GetInstance().GetMainText().SetHintText(formulaText);
            UICommonMsgBox.GetInstance().GetMainText().SetHintTextColor(Color.red);
        }
        else
        {
            //进入转菊花loading界面
            Loading.Singleton.SetLoadingTips((int)LOADINGTIPSENUM.enJumpToBag);
            IMiniServer.Singleton.req_herocardEvolve(CardEvolution.Singleton.m_curEvolutionGuid);
            HideWindow();
        }
    }
示例#10
0
    public void Begin()
    {
        gameObject.SetActive(true);
        m_isStart    = true;
        m_fStartTime = Time.realtimeSinceStartup;
        WorldParamInfo worldParam = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enUrgentEventDurationParam);

        m_fInterval = worldParam.FloatTypeValue;
    }
示例#11
0
    //魔法石招募
    void OnStoneRecruitmentButton(GameObject obj)
    {
        WorldParamInfo    param  = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enMagicStoneRecruitmentNum);
        UICommonMsgBoxCfg boxCfg = m_stoneRecruitmentButton.transform.GetComponent <UICommonMsgBoxCfg>();

        UICommonMsgBox.GetInstance().ShowMsgBox(OnStoneRecruitmentButtonYes, OnStoneRecruitmentButtonNo, boxCfg);
        string buyText = string.Format(Localization.Get("EnsureStoneRecruit"), param.IntTypeValue);

        UICommonMsgBox.GetInstance().GetMainText().SetText(buyText);
    }
示例#12
0
    private bool IsAppraise(int index)
    {
        WorldParamInfo param = GameTable.WorldParamTableAsset.Lookup(index);

        if (param != null && TotalComboNumber == param.IntTypeValue)
        {
            return(true);
        }
        return(false);
    }
示例#13
0
    //点击恢复体力按钮
    void OnRecoverStamina(GameObject obj)
    {
        //恢复体力值数量
        int staminaNum = 0;
        //计算恢复体力所需魔法石
        WorldParamInfo param     = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enRecoverStaminaMagicStoneNum);
        int            needStone = param.IntTypeValue;

        int money = User.Singleton.GetMoney();

        if (needStone > money)
        {
            //弹出二次确认 魔法石不足
            UICommonMsgBoxCfg boxCfg = m_recoverStaminaBG.transform.GetComponent <UICommonMsgBoxCfg>();
            UICommonMsgBox.GetInstance().ShowMsgBox(null, null, boxCfg);
            string text = Localization.Get("NotEnoughMagicStone");
            UICommonMsgBox.GetInstance().GetMainText().SetText(text);
            return;
        }
        //最大体力值上限
        int maxStamina = User.Singleton.GetMaxStamina();
        int stamina    = User.Singleton.UserProps.GetProperty_Int32(UserProperty.stamina);//当前体力值

        //判断是否为最大体力值
        if (stamina >= maxStamina)
        {
            //弹出二次确认 体力值已满
            UICommonMsgBoxCfg boxCfg = m_recoverStaminaButtonLable.transform.GetComponent <UICommonMsgBoxCfg>();
            UICommonMsgBox.GetInstance().ShowMsgBox(null, null, boxCfg);
            string text = Localization.Get("StaminaIsMax");
            UICommonMsgBox.GetInstance().GetMainText().SetText(text);
            return;
        }
        param = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enRecoverStaminaNum);
        //直接回满
        if (0 > param.IntTypeValue)
        {
            //最大体力值上限
            staminaNum = maxStamina - stamina;
        }
        else
        {
            //恢复固定值
            param      = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enRecoverStaminaNum);
            staminaNum = param.IntTypeValue;//恢复多少体力
        }

        //弹出二次确认 是否恢复体力
        UICommonMsgBoxCfg boxCfg2 = m_recoverStaminaButton.transform.GetComponent <UICommonMsgBoxCfg>();

        UICommonMsgBox.GetInstance().ShowMsgBox(OnRecoverStaminaYes, OnRecoverStaminaNo, boxCfg2);
        string text2 = string.Format(Localization.Get("EnsureRecoverStamina"), needStone, staminaNum);

        UICommonMsgBox.GetInstance().GetMainText().SetText(text2);
    }
示例#14
0
    //恢复能量
    void OnRecoverEnergy(GameObject obj)
    {
        //恢复能量值数量
        int energyNum = 0;
        //计算恢能量所需魔法石
        WorldParamInfo param     = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enRecoverEnergyMagicStoneNum);
        int            needStone = param.IntTypeValue;
        //最大军资上限
        int maxEnergy = User.Singleton.GetMaxEnergy();
        int energy    = User.Singleton.UserProps.GetProperty_Int32(UserProperty.energy);//当前军资

        int money = User.Singleton.GetMoney();

        if (needStone > money)
        {
            //弹出二次确认 魔法石不足
            UICommonMsgBoxCfg boxCfg = m_recoverEnergyBG.transform.GetComponent <UICommonMsgBoxCfg>();
            UICommonMsgBox.GetInstance().ShowMsgBox(null, null, boxCfg);
            string text = Localization.Get("NotEnoughMagicStone");
            UICommonMsgBox.GetInstance().GetMainText().SetText(text);
            return;
        }

        //判断是否为最大军资
        if (energy >= maxEnergy)
        {
            //弹出二次确认 军资已满
            UICommonMsgBoxCfg boxCfg = m_recoverEnergyButtonLable.transform.GetComponent <UICommonMsgBoxCfg>();
            UICommonMsgBox.GetInstance().ShowMsgBox(null, null, boxCfg);
            string text = Localization.Get("EnergyIsMax");
            UICommonMsgBox.GetInstance().GetMainText().SetText(text);
            return;
        }
        param = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enRecoverEnergyNum);
        //直接回满
        if (0 > param.IntTypeValue)
        {
            //最大军资上限
            energyNum = maxEnergy - energy;
        }
        else
        {
            //恢复固定值
            param     = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enRecoverEnergyNum);
            energyNum = param.IntTypeValue;//恢复多少军资
        }
        //弹出二次确认 是否恢复军资
        UICommonMsgBoxCfg boxCfg2 = m_recoverEnergyButton.transform.GetComponent <UICommonMsgBoxCfg>();

        UICommonMsgBox.GetInstance().ShowMsgBox(OnRecoverEnergyYes, OnRecoverEnergyNo, boxCfg2);
        string text2 = string.Format(Localization.Get("EnsureRecoverEnergy"), needStone, energyNum);

        UICommonMsgBox.GetInstance().GetMainText().SetText(text2);
    }
示例#15
0
    public void ShowAddCardBagPanel(int addNum, int expandNum)
    {
        string         text      = string.Format(Localization.Get("ExpandBagSpace"), addNum);
        string         titelText = Localization.Get("ExpandBagSuccess");
        BagInfo        info      = GameTable.BagTableAsset.LookUp((int)BAGTYPEENUM.enCardBagType);
        string         useText   = string.Format(Localization.Get("BagSpaceStatus"), (expandNum + info.m_initalSize));
        WorldParamInfo param     = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enExtendBagTipsIconId);
        int            iconId    = param.IntTypeValue;

        RUSure.Singleton.ShowPanelText(text, titelText, useText, iconId);
    }
示例#16
0
    public void Load(byte[] bytes)
    {
        BinaryHelper helper = new BinaryHelper(bytes);
        int          length = helper.ReadInt();

        WorldParamInfoList = new SortedList <int, WorldParamInfo>(length);
        for (int index = 0; index < length; ++index)
        {
            WorldParamInfo info = new WorldParamInfo();
            info.Load(helper);
            WorldParamInfoList.Add(info.ID, info);
        }
    }
示例#17
0
    public void OnShowExpandFriendsSucc(int friendCount)
    {
        //关闭转菊花loading界面
        Loading.Singleton.Hide();
        string         titelText = Localization.Get("ExpandFriendSuccess");
        string         text      = string.Format(Localization.Get("ExpandFriendLimit"), friendCount);
        int            friendNum = User.Singleton.GetFriendCount();
        string         useText   = string.Format(Localization.Get("FriendSpaceStatus"), friendNum);
        WorldParamInfo param     = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enExtendFrindTipsIconId);
        int            iconId    = param.IntTypeValue;

        RUSure.Singleton.ShowPanelText(text, titelText, useText, iconId);
    }
示例#18
0
    //友情招募多次按钮
    void OnFriendRecruitmentMore(GameObject obj)
    {
        WorldParamInfo    param  = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enFrinendShipRecruitmentNum);
        UICommonMsgBoxCfg boxCfg = m_friendRecruitmentMoreButton.transform.GetComponent <UICommonMsgBoxCfg>();

        UICommonMsgBox.GetInstance().ShowMsgBox(OnFriendRecruitmentMoreYes, OnFriendRecruitmentMoreNo, boxCfg);
        string buyText = string.Format(Localization.Get("EnsureFriendRecruit"), (m_moreFriendRecruitment * param.IntTypeValue), m_moreFriendRecruitment);

        UICommonMsgBox.GetInstance().GetMainText().SetText(buyText);
        int friendPoint = User.Singleton.UserProps.GetProperty_Int32(UserProperty.friendship_point);

        buyText = string.Format(Localization.Get("RemainFriendPoints"), (friendPoint - (m_moreFriendRecruitment * param.IntTypeValue)));
        UICommonMsgBox.GetInstance().GetMainText().SetHintText(buyText);
    }
示例#19
0
    public void Update(int skillId)
    {
        CSItem card = CardBag.Singleton.m_cardForDetail;

        if (card == null)
        {
            return;
        }

        SkillInfo skillInfo = GameTable.SkillTableAsset.Lookup(skillId);

        if (null == skillInfo)
        {
            return;
        }
        IconInfomation iconInfo = GameTable.IconInfoTableAsset.Lookup(skillInfo.Icon);

        WindowRoot.GetComponent <UITexture>().mainTexture = PoolManager.Singleton.LoadIcon <Texture>(iconInfo.dirName);


        // 身上是否有此技能

        m_lock.SetActive(!card.HaveSkill(skillId));


        int frameIconId = 0;

        // 是否是 切入技
        if (card.IsSwitchSkill(skillId))
        {
            frameIconId = (int)ENWorldParamIndex.enCardDetailSpecilSkillFrame;
        }
        else
        {
            frameIconId = (int)ENWorldParamIndex.enCardDetailSkillFrame;
        }

        WorldParamInfo worldInfo = GameTable.WorldParamTableAsset.Lookup(frameIconId);

        if (worldInfo != null)
        {
            iconInfo            = GameTable.IconInfoTableAsset.Lookup(worldInfo.IntTypeValue);
            m_frame.mainTexture = PoolManager.Singleton.LoadIcon <Texture>(iconInfo.dirName);
        }

        m_param.m_id = skillId;
    }
示例#20
0
 public override void Init()
 {
     WorldParamList    = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enStartSkillbarTimeMax);
     m_SkillbarMaxTime = WorldParamList.FloatTypeValue;
     IsEnable          = true;
     m_startTime       = Time.realtimeSinceStartup;
     if (null == m_uiSkillBar)
     {
         m_uiSkillBar = UIManager.Singleton.LoadUI <UISkillbar>();
         m_uiSkillBar.OnInit();
     }
     else
     {
         m_uiSkillBar.ShowWindow();
         m_uiSkillBar.m_startTime = Time.realtimeSinceStartup;
     }
 }
示例#21
0
    public EquipBag()
    {
        SetPropertyObjectID((int)MVCPropertyID.enEquipBag);

        m_equipList    = new Dictionary <int, Equip>();
        m_materialList = new Dictionary <int, int>();

        m_sortedEquipList = new Dictionary <int, Equip>();

        WorldParamInfo worldParamInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enEquipBagID);

        if (null == worldParamInfo)
        {
            return;
        }

        BagInfo bagInfo = GameTable.BagTableAsset.LookUp(worldParamInfo.IntTypeValue);

        if (null == bagInfo)
        {
            return;
        }

        m_equipBagInfo = bagInfo;

        m_equipCapacity = bagInfo.m_initalSize;

        worldParamInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enMaterialBagID);
        if (null == worldParamInfo)
        {
            return;
        }

        bagInfo = GameTable.BagTableAsset.LookUp(worldParamInfo.IntTypeValue);

        if (null == bagInfo)
        {
            return;
        }

        m_materialBagInfo = bagInfo;

        m_materialCapacity = bagInfo.m_initalSize;
    }
示例#22
0
    void ShowWarnTips()
    {
        if (m_checkErrorID <= 0)
        {
            return;
        }
        WorldParamInfo info = GameTable.WorldParamTableAsset.Lookup(m_checkErrorID);

        if (null == info)
        {
            return;
        }

        UICommonMsgBoxCfg boxCfg = new UICommonMsgBoxCfg();

        boxCfg.mainTextPrefab = info.StringTypeValue;
        boxCfg.buttonNum      = 1;
        UICommonMsgBox.GetInstance().ShowMsgBox(null, null, boxCfg);
    }
示例#23
0
    public void SetValue(int value)
    {
        WorldParamList = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enSkillbarSkillEND);
        UILabel label = m_obj.GetComponent <UILabel>();

        if (0 == EndTime)
        {
            label.text  = WorldParamList.StringTypeValue;
            label.color = Color.white;
            IsEnable    = false;
        }
        else
        {
            label.text  = EndTime.ToString();
            label.color = Color.blue;
        }
        m_obj.transform.LocalScaleX(0.6f);
        m_obj.transform.LocalScaleY(0.6f);
    }
示例#24
0
    public override void OnInit()
    {
        base.OnInit();
        AddPropChangedNotify((int)MVCPropertyID.enGameSeting, OnPropertyChanged);

        m_gridList          = new Dictionary <int, UIDragScrollView>();
        m_soundSlider       = FindChildComponent <UISlider>("SoundSlider");
        m_soundEffectSlider = FindChildComponent <UISlider>("SoundEffectSlider");
        m_doubleClickSlider = FindChildComponent <UISlider>("DoubleClickSlider");
        m_settingPanel      = FindChildComponent <UIPanel>("SettingPanel");
        m_illustratedPanel  = FindChildComponent <UIPanel>("IllustratedPanel");
        m_soundIcon         = FindChildComponent <UISprite>("SoundIcon");
        m_girdPanel         = FindChildComponent <UIGrid>("ImageGridList");
        m_item          = FindChildComponent <UIDragScrollView>("ImageGird");
        m_sortCardPanel = FindChildComponent <UIPanel>("SortCardPanel");
        m_occToggles    = FindChildComponent <UITable>("Occupation").gameObject;
        m_raceToggles   = FindChildComponent <UITable>("Race").gameObject;

        m_OKButton = FindChildComponent <UIButton>("OK").gameObject;

        m_selectedPanel   = FindChild("SelectedPanel");
        m_selectedContion = FindChild("SelectedCondition", m_selectedPanel);
        m_cancelSelect    = FindChild("cancel", m_selectedPanel);
        m_backgroundGrid  = FindChild("Grid", m_selectedPanel);
        m_bg = FindChild("bg", m_selectedPanel);


        m_changeNamePanel = FindChildComponent <UIPanel>("ChangeNamePanel");
        m_userName        = FindChildComponent <UIInput>("ChangeNameInput");
        m_okChangeButton  = FindChildComponent <UIButton>("OKChangeNameButton");


        WorldParamInfo worldInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enUnlockHeadImgIconId);
        IconInfomation iconInfo  = GameTable.IconInfoTableAsset.Lookup(worldInfo.IntTypeValue);

        m_unopen = PoolManager.Singleton.LoadIcon <Texture2D>(iconInfo.dirName);
        InitIllustratedList();
        UpdateIllustratedPanel();
        RefreshOccAndRace();
        RefreshSelectedCondition();
        InitPanelSetting();
    }
示例#25
0
    public override void Init()
    {
        IsEnable        = true;
        m_startTime     = Time.realtimeSinceStartup;
        WorldParamList  = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enSkillbarSkillCountDown);
        m_countdowntime = WorldParamList.FloatTypeValue;

        if (null == m_obj)
        {
            PoolManager.Singleton.LoadResourceAsyncCallback(GameData.GetUIPath("EndTimeDisplay"), LoadObjCallback);
            //GameObject prefabObj = GameData.LoadPrefab<GameObject>("UI/EndTimeDisplay");
            //m_obj = GameObject.Instantiate(prefabObj) as GameObject;
            //m_obj.name = m_obj.name + "_" + (++m_count).ToString();
            //m_obj.transform.parent = MainGame.Singleton.MainObject.transform;
        }
        else
        {
            m_obj.SetActive(true);
        }
    }
示例#26
0
    void OnButtonOK(GameObject obj)
    {
        //HideWindow();
        UICommonMsgBoxCfg boxCfg = m_buttonOk.transform.GetComponent <UICommonMsgBoxCfg>();

        UICommonMsgBox.GetInstance().ShowMsgBox(OnCardDivisionUpdateOK, OnCardDivisionUpdateNO, boxCfg);
        string formulaText = Localization.Get("EnsureChooseUpdateFormula");

        UICommonMsgBox.GetInstance().GetMainText().SetText(formulaText);
        //如果素材里面有 规定的稀有星级卡牌
        foreach (KeyValuePair <int, CSItem> item in CardDivisionUpdateProp.Singleton.m_chooseCardList)
        {
            WorldParamInfo worldInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enCardDivisionMaterialStarLevel);
            HeroInfo       heroInfo  = GameTable.HeroInfoTableAsset.Lookup(item.Value.IDInTable);
            if (null != heroInfo && worldInfo.IntTypeValue <= heroInfo.Rarity)
            {
                formulaText = Localization.Get("WarningOfTheMaterial");
                UICommonMsgBox.GetInstance().GetMainText().SetHintText(formulaText);
                UICommonMsgBox.GetInstance().GetMainText().SetHintTextColor(Color.red);
            }
        }
    }
示例#27
0
    //添加非指定素材
    void AddUnAppoint(UISprite sprite, FormulaParam param)
    {
        Transform      texure     = sprite.transform.Find("Sprite");
        Transform      starTexure = sprite.transform.Find("Texture");
        WorldParamInfo worldInfo  = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enCardDivisionUnAppointIcon);
        IconInfomation imageInfo  = GameTable.IconInfoTableAsset.Lookup(worldInfo.IntTypeValue);

        texure.GetComponent <UITexture>().mainTexture = PoolManager.Singleton.LoadIcon <Texture>(imageInfo.dirName);
        Transform      label    = sprite.transform.Find("MateriaLabel");
        int            level    = param.paramLevel;
        int            occ      = param.paramOccu;
        int            star     = param.paramRarity;
        OccupationInfo occTable = GameTable.OccupationInfoAsset.LookUp(occ);

        if (null == occTable)
        {
            return;
        }
        label.GetComponent <UILabel>().text  = string.Format(Localization.Get("Occupation"), occTable.m_name, level);
        label.GetComponent <UILabel>().color = Color.red;
        label.gameObject.SetActive(true);
        //设置星级图标
        RarityRelativeInfo rarityInfo = GameTable.RarityRelativeAsset.LookUp(star);

        if (null == rarityInfo)
        {
            Debug.Log("RarityRelativeInfo rarityInfo == null info.RarityId:" + star);
            return;
        }
        IconInfomation rarityIcon = GameTable.IconInfoTableAsset.Lookup(rarityInfo.m_iconId);

        if (null == rarityIcon)
        {
            Debug.Log("IconInfomation rarityIcon == null rarityInfo.m_iconId:" + rarityInfo.m_iconId);
            return;
        }
        starTexure.GetComponent <UITexture>().mainTexture = PoolManager.Singleton.LoadIcon <Texture>(rarityIcon.dirName);
        starTexure.gameObject.SetActive(true);
    }
示例#28
0
    void OnStoneRecruitmentButtonYes(object sender, EventArgs e)
    {
        //确认购买后判断魔法石是否足够 不够 二次确认框 魔法石不足
        int            bindMoney = User.Singleton.UserProps.GetProperty_Int32(UserProperty.bind_money);
        WorldParamInfo param     = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enMagicStoneRecruitmentNum);

        if (param.IntTypeValue > bindMoney)
        {
            UICommonMsgBoxCfg boxCfg = m_stoneRecruitmentGrid.transform.GetComponent <UICommonMsgBoxCfg>();
            UICommonMsgBox.GetInstance().ShowMsgBox(null, null, boxCfg);
            string text = Localization.Get("NotEnoughMagicStone");
            UICommonMsgBox.GetInstance().GetMainText().SetText(text);
            return;
        }
        //进入转菊花loading界面
        Loading.Singleton.SetLoadingTips((int)(LOADINGTIPSENUM.enJumpToStore));
        //如果足够 发送消息 到服务器魔法石招募
        ShopProp.Singleton.SendMagicStoneRecruitment();
        ////关闭抽卡界面
        //m_Recruitment.gameObject.SetActive(false);
        HideWindow();
    }
示例#29
0
    //添加荣誉戒指素材
    void AddRingOfHonor(UISprite sprite, FormulaParam param)
    {
        Transform      texure    = sprite.transform.Find("Sprite");
        WorldParamInfo worldInfo = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enCardDivisionRingHonorIcon);
        IconInfomation imageInfo = GameTable.IconInfoTableAsset.Lookup(worldInfo.IntTypeValue);

        texure.GetComponent <UITexture>().mainTexture = PoolManager.Singleton.LoadIcon <Texture>(imageInfo.dirName);

        Transform label   = sprite.transform.Find("MateriaLabel");
        int       ringNum = User.Singleton.UserProps.GetProperty_Int32(UserProperty.ring);

        label.GetComponent <UILabel>().text = string.Format(Localization.Get("WithTheMaterial"), ringNum);
        if (ringNum < param.paramRingNum)
        {
            label.GetComponent <UILabel>().color = Color.red;
        }
        else
        {
            sprite.GetComponent <Parma>().m_type = 1;
            label.GetComponent <UILabel>().color = Color.green;
        }
        label.gameObject.SetActive(true);
    }
示例#30
0
    public void OnShowRecoverStaminaSucc(int staminaNum)
    {
        //关闭转菊花loading界面
        Loading.Singleton.Hide();
        string         titelText = Localization.Get("StaminaTitle");
        string         text      = "";
        string         useText   = Localization.Get("AdventureTips");
        WorldParamInfo param     = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enRecoverStaminaIconId);
        int            iconId    = param.IntTypeValue;

        WorldParamInfo info = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enRecoverStaminaNum);

        if (0 > info.IntTypeValue)
        {
            text = Localization.Get("AllRecoverStamina");
        }
        else
        {
            text = string.Format(Localization.Get("RecoverStamina"), staminaNum);
        }

        RUSure.Singleton.ShowPanelText(text, titelText, useText, iconId);
    }