public bool HasEquipped(BodyPart part) { if (part.Equals(BaseBody)) return true; for (int x = 0; x < Movement.Length; x++) { if (part.Equals(Movement[x])) { return true; } } for (int x = 0; x < Utility.Length; x++) { if (part.Equals(Utility[x])) { return true; } } for (int x = 0; x < Armor.Length; x++) { if (part.Equals(Armor[x])) { return true; } } for (int x = 0; x < Attacks.Length; x++) { if (part.Equals(Attacks[x])) { return true; } } return false; }
public void Unequip(BodyPart part) { for (int x = 0; x < Movement.Length; x++) { if (part.Equals(Movement[x])) { Movement[x] = null; return; } } for (int x = 0; x < Utility.Length; x++) { if (part.Equals(Utility[x])) { Utility[x] = null; return; } } for (int x = 0; x < Armor.Length; x++) { if (part.Equals(Armor[x])) { Armor[x] = null; return; } } for (int x = 0; x < Attacks.Length; x++) { if (part.Equals(Attacks[x])) { Attacks[x] = null; return; } } }