Esempio n. 1
0
    public void Init(int id)
    {
        this.m_ID = id;
        GameLogic.Hold.BattleData.Challenge_Init(this.m_ID);
        object[] args = new object[] { (this.m_ID - 0x834).ToString() };
        this.Text_Title.text   = GameLogic.Hold.Language.GetLanguageByTID("Challenge_Title", args);
        this.Text_Success.text = GameLogic.Hold.BattleData.Challenge_GetSuccessString();
        this.mConditionUICtrl.Init();
        int[] reward = GameLogic.Hold.BattleData.ActiveData.Reward;
        if (reward.Length < 3)
        {
            object[] objArray2 = new object[] { GameLogic.Hold.BattleData.ActiveData.ID };
            SdkManager.Bugly_Report("ChallengeUICtrl", Utils.FormatString("ActiveData[{0}] reward.length < 3", objArray2));
        }
        switch (((PropType)reward[0]))
        {
        case PropType.eCurrency:
        {
            FoodOneType type2     = (FoodOneType)reward[1];
            object[]    objArray3 = new object[] { reward[2] };
            this.Text_RewardCount.text = Utils.FormatString("{0}", objArray3);
            break;
        }

        case PropType.eEquip:
        {
            int      equipIcon = LocalModelManager.Instance.Equip_equip.GetBeanById(reward[1]).EquipIcon;
            object[] objArray4 = new object[] { reward[2] };
            this.Text_RewardCount.text = Utils.FormatString("{0}个", objArray4);
            this.Image_RewardIcon.set_sprite(SpriteManager.GetEquip(equipIcon));
            break;
        }

        case PropType.eCard:
        {
            int      groupID   = LocalModelManager.Instance.Skill_slotout.GetBeanById(reward[1]).GroupID;
            object[] objArray5 = new object[] { reward[2] };
            this.Text_RewardCount.text = Utils.FormatString("{0}个", objArray5);
            this.Image_RewardIcon.set_sprite(SpriteManager.GetCard(groupID));
            break;
        }
        }
        this.Text_SuccessContent.text  = GameLogic.Hold.Language.GetLanguageByTID("Challenge_Success", Array.Empty <object>());
        this.Text_RewardContent.text   = GameLogic.Hold.Language.GetLanguageByTID("Challenge_Reward", Array.Empty <object>());
        this.Text_ChallengeButton.text = GameLogic.Hold.Language.GetLanguageByTID("Challenge_Button", Array.Empty <object>());
    }
Esempio n. 2
0
    public BattleDropData(FoodType type, object data)
    {
        FoodOneType childtype = FoodOneType.eGold01;

        if (type != FoodType.eGold)
        {
            if (type == FoodType.eEquip)
            {
                this.Init(type, childtype, data);
            }
            else
            {
                object[] args = new object[] { type };
                SdkManager.Bugly_Report("GameData.BattleDropData", Utils.FormatString("new BattleDropData type[{0}] is error!", args));
            }
        }
        else
        {
            int num = (int)data;
            if (num < 10)
            {
                childtype = FoodOneType.eGold01;
            }
            else if (num < 100)
            {
                childtype = FoodOneType.eGold02;
            }
            else if (num < 0x3e8)
            {
                childtype = FoodOneType.eGold03;
            }
            else
            {
                childtype = FoodOneType.eGold04;
            }
            this.Init(type, childtype, data);
        }
    }
Esempio n. 3
0
 private void Init(FoodType type, FoodOneType childtype, object data)
 {
     this.type      = type;
     this.childtype = childtype;
     this.data      = data;
 }
Esempio n. 4
0
 public BattleDropData(FoodType type, FoodOneType childtype, object data)
 {
     this.Init(type, childtype, data);
 }