예제 #1
0
        public void SetActiveReward(BattleQuestReward reward, int quantity, long itemId)
        {
            this.itemReward.gameObject.SetActive(false);
            this.experienceReward.gameObject.SetActive(false);
            this.crystalReward.gameObject.SetActive(false);
            switch (reward)
            {
            case BattleQuestReward.CRYSTALS:
                this.crystalReward.gameObject.SetActive(true);
                this.crystalReward.SetReward(quantity);
                break;

            case BattleQuestReward.TURRET_EXP:
            case BattleQuestReward.HULL_EXP:
                this.itemReward.gameObject.SetActive(true);
                this.itemReward.SetReward(quantity, itemId);
                break;

            case BattleQuestReward.RANK_EXP:
                this.experienceReward.gameObject.SetActive(true);
                this.experienceReward.SetReward(quantity);
                break;

            case BattleQuestReward.CHEST_SCORE:
                break;

            default:
                throw new ArgumentOutOfRangeException("reward");
            }
        }
        public void FillBattleQuest(NodeAddedEvent e, BattleQuestGuiNode gui, [JoinByBattleQuest, Context] BattleQuestNode battleQuest, [JoinAll] SingleNode <SelfUserComponent> user, [JoinByUser] WeaponNode weapon, [JoinByMarketItem] SingleNode <MarketItemComponent> weaponMarketItem, [JoinAll] SingleNode <SelfUserComponent> user2, [JoinByUser] SingleNode <TankComponent> hull, [JoinByMarketItem] SingleNode <MarketItemComponent> hullMarketItem)
        {
            InBattleQuestItemGUIComponent inBattleQuestItemGUI = gui.inBattleQuestItemGUI;

            inBattleQuestItemGUI.TaskText = battleQuest.descriptionItem.Description.Replace("{TargetValue}", battleQuest.battleQuestTarget.TargetValue.ToString());
            inBattleQuestItemGUI.SetImage(battleQuest.imageItem.SpriteUid);
            inBattleQuestItemGUI.TargetProgressValue  = battleQuest.battleQuestTarget.TargetValue.ToString();
            inBattleQuestItemGUI.CurrentProgressValue = "0";
            BattleQuestReward battleQuestReward = battleQuest.battleQuestReward.BattleQuestReward;
            long itemId = (battleQuestReward != BattleQuestReward.HULL_EXP) ? weaponMarketItem.Entity.Id : hullMarketItem.Entity.Id;

            inBattleQuestItemGUI.SetReward(battleQuestReward, battleQuest.battleQuestReward.Quantity, itemId);
        }
예제 #3
0
 public void SetReward(BattleQuestReward reward, int quatity, long itemId)
 {
     this.rewardContainer.SetActiveReward(reward, quatity, itemId);
 }