Пример #1
0
    public void addReward(BattleReward.RewardType rewardType, int amount, string rewardName = "")
    {
        BattleReward createdChild = Instantiate <BattleReward>(prefab, contentsArea.transform);

        createdChild.set(rewardType, amount, rewardName);
        rewards.Add(createdChild);
    }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     if (rendererObject != null)
     {
         SpriteRenderer renderer = rendererObject.GetComponent <SpriteRenderer>();
         BattleReward   reward   = GetComponent <CapturePoint>().reward;
         if (reward == BattleReward.Attack)
         {
             renderer.sprite = Attack;
         }
         if (reward == BattleReward.DodgeChance)
         {
             renderer.sprite = Shield;
         }
         if (reward == BattleReward.Health)
         {
             renderer.sprite = Health;
         }
         if (reward == BattleReward.Armor)
         {
             renderer.sprite = Armor;
         }
         if (reward == BattleReward.Money)
         {
             renderer.sprite = Money;
         }
         if (reward == BattleReward.None)
         {
             renderer.sprite = null;
         }
     }
 }
Пример #3
0
 // Token: 0x06014364 RID: 82788 RVA: 0x00524BA0 File Offset: 0x00522DA0
 protected void OnTreasureLevelBattleFinishedAck(int result, bool isWin, BattleReward reward)
 {
     base.Result = result;
     this.IsWin  = isWin;
     this.Reward = reward;
     this.OnTransactionComplete();
 }
Пример #4
0
 // Token: 0x06012D15 RID: 77077 RVA: 0x004CF1CC File Offset: 0x004CD3CC
 protected void OnRiftLevelRaidAck(int result, BattleReward reward, List <Goods> extraReward)
 {
     base.Result      = result;
     this.Reward      = reward;
     this.ExtraReward = extraReward;
     this.OnTransactionComplete();
 }
 // Token: 0x06009B26 RID: 39718 RVA: 0x002C3488 File Offset: 0x002C1688
 protected void OnArenaBattleFinishedAck(int result, BattleReward reward, bool isWin)
 {
     base.Result = result;
     this.IsWin  = isWin;
     this.Reward = reward;
     this.OnTransactionComplete();
 }
Пример #6
0
        // Token: 0x0600AFE7 RID: 45031 RVA: 0x0030D168 File Offset: 0x0030B368
        public static BattleResultScoreUITask StartUITask(BattleReward battleReward)
        {
            UIIntentCustom uiintentCustom = new UIIntentCustom(typeof(BattleResultScoreUITask).Name, null);

            uiintentCustom.SetParam("BattleReward", battleReward);
            return(UIManager.Instance.StartUITask(uiintentCustom, false, false, null) as BattleResultScoreUITask);
        }
Пример #7
0
    public void addMonster(BattleReward reward)
    {
        Utils.Assert(reward == null, "We can't add empty list.");

        if (reward != null && reward.p != null)
        {
            addMonster(reward.p);
        }
    }
Пример #8
0
        // Token: 0x0600CC12 RID: 52242 RVA: 0x00382FAC File Offset: 0x003811AC
        public static ChestUITask StartUITask(BattleReward reward, bool isFirstWin, bool isAutoOpen)
        {
            UIIntentCustom uiintentCustom = new UIIntentCustom(typeof(ChestUITask).Name, null);

            uiintentCustom.SetParam("BattleReward", reward);
            uiintentCustom.SetParam("IsFirstWin", isFirstWin);
            uiintentCustom.SetParam("AutoOpen", isAutoOpen);
            return(UIManager.Instance.StartUITask(uiintentCustom, false, false, null) as ChestUITask);
        }
Пример #9
0
 // Token: 0x0601166B RID: 71275 RVA: 0x00482B30 File Offset: 0x00480D30
 protected void OnHeroPhantomBattleFinishedAck(int result, bool isWin, BattleReward reward, bool isFirstWin, List <int> achievements)
 {
     base.Result       = result;
     this.IsWin        = isWin;
     this.Reward       = reward;
     this.IsFirstWin   = isFirstWin;
     this.Achievements = achievements;
     this.OnTransactionComplete();
 }
Пример #10
0
    private void addItem(BattleReward reward)
    {
        Utils.Assert(reward == null, "We can't add empty list.");

        if (reward != null && reward.p != null)
        {
            this.addItem(reward.p);
        }
    }
Пример #11
0
    private void addEquipment(BattleReward reward)
    {
        Utils.Assert(reward == null, "We can't add empty list.");

        if (reward != null && reward.p != null)
        {
            AddEquip(reward.p);
        }
    }
 // Token: 0x06012D08 RID: 77064 RVA: 0x004CF080 File Offset: 0x004CD280
 protected void OnRiftLevelBattleFinishedAck(int result, int stars, BattleReward reward, bool isFirstWin, List <int> achievements)
 {
     base.Result       = result;
     this.Stars        = stars;
     this.Reward       = reward;
     this.IsFirstWin   = isFirstWin;
     this.Achievements = achievements;
     this.OnTransactionComplete();
 }
Пример #13
0
 public static void PrepareBattle
 (
     Sprite battleIcon,
     BattleReward rewardType,
     string rewardDeckName,
     Classes masterClassParam = Classes.NOT_A_CLASS,
     AudioClip bgmParam       = null
 )
 {
     PrepareBattle(battleIcon, Color.gray, rewardType, rewardDeckName, masterClassParam, bgmParam);
 }
Пример #14
0
 private IEnumerator Co_ShowBattleResultScore(BattleReward battleReward)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_Co_ShowBattleResultScoreBattleReward_hotfix != null)
     {
         return((IEnumerator)this.m_Co_ShowBattleResultScoreBattleReward_hotfix.call(new object[]
         {
             this,
             battleReward
         }));
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     BattleResultScoreUIController.< Co_ShowBattleResultScore > c__Iterator0 <Co_ShowBattleResultScore> c__Iterator = new BattleResultScoreUIController.< Co_ShowBattleResultScore > c__Iterator0();
 private IEnumerator Co_ShowRaidResult(BattleReward reward)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_Co_ShowRaidResultBattleReward_hotfix != null)
     {
         return((IEnumerator)this.m_Co_ShowRaidResultBattleReward_hotfix.call(new object[]
         {
             this,
             reward
         }));
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     ClimbTowerRaidUIController.< Co_ShowRaidResult > c__Iterator0 <Co_ShowRaidResult> c__Iterator = new ClimbTowerRaidUIController.< Co_ShowRaidResult > c__Iterator0();
Пример #16
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
    }
 // Token: 0x0600C946 RID: 51526 RVA: 0x0037A128 File Offset: 0x00378328
 public void ShowRaidResult(BattleReward reward)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ShowRaidResultBattleReward_hotfix != null)
     {
         this.m_ShowRaidResultBattleReward_hotfix.call(new object[]
         {
             this,
             reward
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     base.StartCoroutine(this.Co_ShowRaidResult(reward));
 }
Пример #18
0
 private IEnumerator Co_ShowReward(BattleReward reward, bool isFirstWin, bool isAutoOpen)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_Co_ShowRewardBattleRewardBooleanBoolean_hotfix != null)
     {
         return((IEnumerator)this.m_Co_ShowRewardBattleRewardBooleanBoolean_hotfix.call(new object[]
         {
             this,
             reward,
             isFirstWin,
             isAutoOpen
         }));
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     ChestUIController.< Co_ShowReward > c__Iterator0 <Co_ShowReward> c__Iterator = new ChestUIController.< Co_ShowReward > c__Iterator0();
Пример #19
0
 // Token: 0x0600CB96 RID: 52118 RVA: 0x00381428 File Offset: 0x0037F628
 public void ShowReward(BattleReward reward, bool isFirstWin, bool isAutoOpen)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ShowRewardBattleRewardBooleanBoolean_hotfix != null)
     {
         this.m_ShowRewardBattleRewardBooleanBoolean_hotfix.call(new object[]
         {
             this,
             reward,
             isFirstWin,
             isAutoOpen
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     base.StartCoroutine(this.Co_ShowReward(reward, isFirstWin, isAutoOpen));
 }
Пример #20
0
    public static int Clear(IntPtr l)
    {
        int result;

        try
        {
            BattleReward battleReward = (BattleReward)LuaObject.checkSelf(l);
            battleReward.Clear();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Пример #21
0
    public static int get_HeroScoreBonus(IntPtr l)
    {
        int result;

        try
        {
            BattleReward battleReward = (BattleReward)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, battleReward.HeroScoreBonus);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Пример #22
0
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            BattleReward o = new BattleReward();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Пример #23
0
    public void ClickRewardItemInfo(GameObject go)
    {
        string str = go.transform.parent.gameObject.name;

        string[] strList = str.Split('m');

        int value = int.Parse(strList[1]) - 1;


        BattleReward reward = Core.Data.temper.warBattle.reward;
        Vector3      v3     = new Vector3(0, border.height / 2, 0);

        if (value == 0)
        {
            v3 = new Vector3(65, border.height / 2, 0);
        }
        InitHeadIntroduce(reward.p[value], v3);
    }
Пример #24
0
    public static void PrepareBattle
    (
        Sprite battleIcon,
        Color deckColorParam,
        BattleReward rewardTypeParam,
        string rewardDeckNameParam,
        Classes masterClassParam = Classes.NOT_A_CLASS,
        AudioClip bgmParam       = null
    )
    {
        deckColor      = masterClassParam == Classes.NOT_A_CLASS ? deckColorParam : ClassInfo.GetColorOfClass(masterClassParam);
        enemyDeckClass = masterClassParam;
        bgm            = bgmParam;
        BattleIcon     = battleIcon;

        rewardType     = rewardTypeParam;
        rewardDeckName = rewardDeckNameParam;
    }
Пример #25
0
    public static int IsChestGoodsEmpty(IntPtr l)
    {
        int result;

        try
        {
            BattleReward battleReward = (BattleReward)LuaObject.checkSelf(l);
            bool         b            = battleReward.IsChestGoodsEmpty();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Пример #26
0
    public static int set_Score(IntPtr l)
    {
        int result;

        try
        {
            BattleReward battleReward = (BattleReward)LuaObject.checkSelf(l);
            int          score;
            LuaObject.checkType(l, 2, out score);
            battleReward.Score = score;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Пример #27
0
    public static int set_DailyScoreBonus(IntPtr l)
    {
        int result;

        try
        {
            BattleReward battleReward = (BattleReward)LuaObject.checkSelf(l);
            int          dailyScoreBonus;
            LuaObject.checkType(l, 2, out dailyScoreBonus);
            battleReward.DailyScoreBonus = dailyScoreBonus;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Пример #28
0
    public static int set_FriendGoods(IntPtr l)
    {
        int result;

        try
        {
            BattleReward battleReward = (BattleReward)LuaObject.checkSelf(l);
            List <Goods> friendGoods;
            LuaObject.checkType <List <Goods> >(l, 2, out friendGoods);
            battleReward.FriendGoods = friendGoods;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Пример #29
0
    public static int set_PlayerExp(IntPtr l)
    {
        int result;

        try
        {
            BattleReward battleReward = (BattleReward)LuaObject.checkSelf(l);
            int          playerExp;
            LuaObject.checkType(l, 2, out playerExp);
            battleReward.PlayerExp = playerExp;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Пример #30
0
 // Start is called before the first frame update
 void Start()
 {
     instance = this;
 }