示例#1
0
        private void SetSpell(UpgradeStats.Upgrade upgrade)
        {
            spellLevel   = upgrade.level;
            Stats.Attack = upgrade.value;

            model.SetWeapon(upgrade.level);
        }
示例#2
0
        private void SetArmor(UpgradeStats.Upgrade upgrade)
        {
            armorLevel    = upgrade.level;
            Stats.Defense = upgrade.value;

            var lostHP = MaxHP - CurrentHP;

            MaxHP     = upgrade.value;
            CurrentHP = MaxHP - lostHP;

            currentModel.SetArmor(upgrade.level);
        }
示例#3
0
        private void SetMount(UpgradeStats.Upgrade upgrade)
        {
            Stats.Speed = upgrade.value;
            if (upgrade.level == 0)
            {
                SetModel(groundUnitModel);
            }
            else
            {
                SetModel(mountedUnitModel);
                mountedUnitModel.SetMountLevel(upgrade.level - 1);
            }

            SetEquipmentLevels();
        }
示例#4
0
 private void SetShield(UpgradeStats.Upgrade upgrade)
 {
     shieldLevel  = upgrade.level;
     Stats.Shield = upgrade.value;
     currentModel.SetShield(upgrade.level);
 }
示例#5
0
 private void SetWeapon(UpgradeStats.Upgrade upgrade)
 {
     weaponLevel  = upgrade.level;
     Stats.Attack = upgrade.value;
     currentModel.SetWeapon(upgrade.level);
 }
示例#6
0
 private void SetRange(UpgradeStats.Upgrade upgrade)
 {
     rangeLevel  = upgrade.level;
     Stats.Range = upgrade.value;
     currentModel.SetWeapon(upgrade.level);
 }
示例#7
0
 private void SetDamage(UpgradeStats.Upgrade upgrade)
 {
     damageLevel  = upgrade.level;
     Stats.Attack = upgrade.value;
     currentModel.SetBack(upgrade.level);
 }