void UseItem(int i) { Image[] list = gridLayout.GetComponentsInChildren <Image>(); if (list.Length > i) { Destroy(list[i].gameObject); } PlayerInventory_old.UseItem(i); }
void OnDestroy() { PlayerInventory_old.SaveInventory(); }
// Use this for initialization void Start() { PlayerInventory_old.LoadInventory(); SetInventory(); }