public ConcreteWeapon(int dmg, ClassType aType, SkillClassType sType, ItemFactory.ItemEssentials essentials, GameObject sEffect = null, GameObject sProj = null, GameObject pEffect = null, GameObject proj = null, Sprite pSkillIcon = null) : base(essentials) { baseDamage = dmg; projectile = proj; attackType = aType; this.effect = pEffect; this.projectile = proj; this.skillEffect = sEffect; this.skillProjectile = sProj; this.skillIcon = pSkillIcon; switch (aType) { case ClassType.SWORD: type = GameManager.instance.attackTypeFactory.GetAttackType("SWORD"); break; case ClassType.BOW: type = GameManager.instance.attackTypeFactory.GetAttackType("BOW"); break; case ClassType.BUMERANG: type = GameManager.instance.attackTypeFactory.GetAttackType("BUMERANG"); break; default: break; } switch (sType) { case SkillClassType.BOWTHREEARROWS: skillType = GameManager.instance.skillTypeFactory.GetSkillType("BOWTHREEARROW"); break; case SkillClassType.SWORDWAWE: skillType = GameManager.instance.skillTypeFactory.GetSkillType("SWORDWAWE"); break; case SkillClassType.BOWFIVEARROW: skillType = GameManager.instance.skillTypeFactory.GetSkillType("BOWFIVEARROW"); this.baseValue += (int)((GameManager.instance.currentLevel * 0.2f) * 30); break; case SkillClassType.FIREBALL: skillType = GameManager.instance.skillTypeFactory.GetSkillType("FIREBALL"); break; default: break; } }
public Weapon CreateWeapon(WeaponEssentials ingredients, ItemFactory.ItemEssentials itemEssentials) { Weapon weapon = new ConcreteWeapon(ingredients.baseDamage, ingredients.wep, ingredients.sWep, itemEssentials, ingredients.skillEffect, ingredients.skillProjectile, ingredients.attackEffect, ingredients.attackProjectile, ingredients.skillIcon); if (ingredients.attr == AttributeType.FIRE) { weapon = new FireAttribute((Weapon)weapon); } else if (ingredients.attr == AttributeType.ICE) { weapon = new IceAttribute((Weapon)weapon); } return(weapon); }
public Item(ItemFactory.ItemEssentials ingredients) { mainItemEssentials = ingredients; this.itemIcon = ingredients.itemIcon; this.baseValue = ingredients.baseValue; this.level = ingredients.level; this.itemName = ingredients.itemName; this.weight = ingredients.weight; this.size = ingredients.size; this.isEquippable = ingredients.isEquippable; this.isUsable = ingredients.isUsable; this.renderableForm = ingredients.renderableForm; this.owner = ingredients.owner; this.itemType = ingredients.itemType; }
public Armor CreateArmor(ArmorEssentials armorEssentials, ItemFactory.ItemEssentials itemEssentials) { switch (armorEssentials.armType) { case Armor.ClassType.HELMET: return(new Helmet(itemEssentials)); case Armor.ClassType.CHEST: return(new Chest(itemEssentials)); case Armor.ClassType.SHOES: return(new Shoes(itemEssentials)); default: return(null); } }
public Potion CreatePotion(PotionEssentials potEssentials, ItemFactory.ItemEssentials itemEssentials) { Potion pot = null; switch (potEssentials.potType) { case Potion.PotionType.HEALTH: pot = new HealthPotion(itemEssentials); break; case Potion.PotionType.MANA: break; case Potion.PotionType.STAMINA: break; } // return(pot); }
public Shoes(ItemFactory.ItemEssentials itemEssentials) : base(itemEssentials) { this.type = ClassType.SHOES; baseDefence = GameManager.instance.currentLevel * Random.Range(GameManager.instance.currentLevel * 3, GameManager.instance.currentLevel * 6); }
public Chest(ItemFactory.ItemEssentials itemEssentials) : base(itemEssentials) { this.type = ClassType.CHEST; baseDefence = GameManager.instance.currentLevel * Random.Range(GameManager.instance.currentLevel * 7, GameManager.instance.currentLevel * 14); }
public Helmet(ItemFactory.ItemEssentials itemEssentials) : base(itemEssentials) { this.type = ClassType.HELMET; baseDefence = GameManager.instance.currentLevel * Random.Range(GameManager.instance.currentLevel * 5, GameManager.instance.currentLevel * 10); }
public Armor(ItemFactory.ItemEssentials itemEssentials) : base(itemEssentials) { }
public Potion(ItemFactory.ItemEssentials itemEssentials) : base(itemEssentials) { essentials = itemEssentials; }
public HealthPotion(ItemFactory.ItemEssentials itemEssentials) : base(itemEssentials) { potionType = PotionType.HEALTH; }
public Weapon(ItemFactory.ItemEssentials itemEssentials) : base(itemEssentials) { }
protected WeaponAttribute(ItemFactory.ItemEssentials essentials) : base(essentials) { }