Синтаксис:
Используется csharp
if(Input.GetKeyDown(KeyCode.E))
{
for (int i = 0; i < 10; i++)
{
if (GetComponent<Inventory>().items[i] == 0)
{
GetComponent<Inventory>().items[i] = 1;
i = 25;
}
}
}
}
}
{
for (int i = 0; i < 10; i++)
{
if (GetComponent<Inventory>().items[i] == 0)
{
GetComponent<Inventory>().items[i] = 1;
i = 25;
}
}
}
}
}