public PlayerStatus() { this.hp = this.hearts * HP_Per_Heart; this.equippedArm = new EquipableItem("none", 0, EquipItemType.Arm); this.equippedArmor = new EquipableItem("none", 0, EquipItemType.Armor); this.equippedShield = new EquipableItem("none", 0, EquipItemType.Shield); }
public EquipMenuOption(Point position, EquipableItem p_item) { this.item = p_item; string[] twoPartName = this.item.GetTwoPartName(); base.Init(new Point(-1, -1), twoPartName[0], twoPartName[1], position, 20); base.topLine.Shadow = this.item.State == EquipItemState.Equipped; base.bottomLine.Shadow = this.item.State == EquipItemState.Equipped; }
public EquipableShopItem(EquipableItem p_item, int p_price, Point p_location) { this.item = p_item; this.price = p_price; this.icon = this.item.Icon; if (p_item.State == EquipItemState.NotFound) { string[] twoPartName = this.item.GetTwoPartName(); this.itemName = new GameText(twoPartName[0]); this.itemName.Shadow = true; this.itemName2 = new GameText(twoPartName[1]); this.itemName2.Shadow = true; } else { this.itemName = new GameText("SOLD OUT"); this.itemName.Shadow = true; this.itemName2 = new GameText(" "); this.itemName2.Shadow = true; } this.location = p_location; this.itemName.Location = (PointF) new Point(this.location.X + 0x10, this.location.Y + 8); this.itemName2.Location = (PointF) new Point(this.location.X + 0x10, this.location.Y + 0x10); }
private void LoadItem(EquipableItem item, string str) { if (str.Equals("Equipped")) { this.playerStats.EquipItem(item); } else if (str.Equals("NotEquipped")) { item.State = EquipItemState.NotEquipped; } else { item.State = EquipItemState.NotFound; } }
public EquipItemType SetItem(string itemString) { this.item = GameEngine.Game.GetItemByName(itemString); if (this.item.State == EquipItemState.NotFound) { return this.item.Type; } return EquipItemType.None; }
public void EquipItem(EquipableItem item, bool unequipPrevious) { if (item.Type == EquipItemType.Arm) { if (unequipPrevious && (this.equippedArm.State == EquipItemState.Equipped)) { this.equippedArm.State = EquipItemState.NotEquipped; } this.equippedArm = null; this.equippedArm = item; this.equippedArm.State = EquipItemState.Equipped; GameEngine.Game.GetPlayer().AttackDamage = this.AP; } else if (item.Type == EquipItemType.Armor) { if (unequipPrevious && (this.equippedArmor.State == EquipItemState.Equipped)) { this.equippedArmor.State = EquipItemState.NotEquipped; this.equippedArmor = null; } this.equippedArmor = item; this.equippedArmor.State = EquipItemState.Equipped; } else if (item.Type == EquipItemType.Shield) { if (unequipPrevious && (this.equippedShield.State == EquipItemState.Equipped)) { this.equippedShield.State = EquipItemState.NotEquipped; } this.equippedShield = null; this.equippedShield = item; this.equippedShield.State = EquipItemState.Equipped; } }
public void EquipItem(EquipableItem item) { this.EquipItem(item, true); }