Beispiel #1
0
        /// <summary>
        /// 保持しているBonusのlimitを進めます
        /// </summary>
        public void advanceLimit()
        {
            var battleAbilities = battleAbilityBonusList.Keys;

            foreach (BattleAbility ability in battleAbilities)
            {
                int count = battleAbilityBonusList[ability].Count;
                for (int i = 0; i < count; i++)
                {
                    BattleAbilityBonus bonus = battleAbilityBonusList[ability][i];
                    if (!bonus.nextFrame())
                    {
                        battleAbilityBonusList [ability].Remove(bonus);
                    }
                }
            }

            var subAbilities = subAbilityBonusList.Keys;

            foreach (SubBattleAbility ability in subAbilities)
            {
                int count = subAbilityBonusList[ability].Count;
                for (int i = 0; i < count; i++)
                {
                    SubBattleAbilityBonus bonus = subAbilityBonusList[ability][i];
                    if (!bonus.nextFrame())
                    {
                        subAbilityBonusList [ability].Remove(bonus);
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// 与えられたボーナスを追加します
        /// 引数がBattleAbilityBonusかSubBattleAbilityBonusかでオーバーロードします
        /// </summary>
        /// <param name="bonus">追加したいボーナス</param>
        public void setBonus(BattleAbilityBonus bonus)
        {
            UnityEngine.Debug.Log("setted bonus");
            BattleAbility bonusAbility = bonus.getBonusAbility();

            battleAbilityBonusList [bonusAbility].Add(bonus);
        }