public void OnEquip(object sender, EventArgs args) { if (!(sender is InventoryItem)) { return; } else { InventoryItem item = (InventoryItem)sender; EquipmentWindowComponent equipment = equipmentWindow.Component as EquipmentWindowComponent; equipment.EquipItem(item); } }
public void EquipItem(InventoryItem item) { EquipmentWindowComponent equipment = equipmentWindow.Component as EquipmentWindowComponent; equipment.EquipItem(item); }