I want to use a case switch to run code based on which equipment slot something is placed in. the point of this is to use with a different asset that has a cosmetic armor system already, so I just want UIS to run that assets functions to visually equip things
I want to make my own script that inherits from the equipper and overrides equip, like the demo equipper script. I don't know the simple/proper way to get an attribute from something that was just equipped based on the slot
btw I wrote this code in the code editor here, it's not what I'm using, I did it as an example of what I plan to do hoping to get some help with the way this asset wants me to do what im trying to do!
I want to make my own script that inherits from the equipper and overrides equip, like the demo equipper script. I don't know the simple/proper way to get an attribute from something that was just equipped based on the slot
C#:
switch ("Item Catagory?")
{
case "Chest Wear":
EquipVest(SpriteId)
break;
case "Arm Wear":
EquipVest(SpriteId)
break;
case "Leg Wear":
EquipLeggings(SpriteId)
break;
default:
break;
}
public void EquipVest(string SpriteId)
{
if (SpriteId == null) UnEquip(EquipmentPart.Vest);
else Equip(SpriteCollection.Armor.Single(i => i.Id == SpriteId), EquipmentPart.Vest);
}
public void EquipBracers(string SpriteId)
{
if (SpriteId == null) UnEquip(EquipmentPart.Bracers);
else Equip(SpriteCollection.Armor.Single(i => i.Id == SpriteId), EquipmentPart.Bracers);
}
public void EquipLeggings(string SpriteId)
{
if (SpriteId == null) UnEquip(EquipmentPart.Leggings);
else Equip(SpriteCollection.Armor.Single(i => i.Id == SpriteId), EquipmentPart.Leggings);
}