im sorry if this is a newbie question but this make me confuses and i dont know what word i must type on google to find answer of my question
straight to my problem here my code
void OnEquipChecker(ItemType type)
{
Item_Script[] items = FindObjectsOfType(typeof(Item_Script)) as Item_Script[];
foreach (Item_Script item in items)
{
if (item.isAlreadyEquip == 1)
{
// here what im working
// and the result is all item with variable isAlreadyEquip change too not just ItemType.Support
if(type == ItemType.Support)
item.isAlreadyEquip = 0;
}
}
}
my question is how to change all variable isAlreadyEquip with ItemType.Support and not affected all other ItemType?