public void MoveOut() { if (level > 0) { switch (curCat) { case categories.Inventory: PlayerInventory inv = gameObject.GetComponent <PlayerInventory> (); inv.MoveInOutInventory(false, level, index); break; case categories.Player: PlayerEquipped eq = gameObject.GetComponent <PlayerEquipped> (); eq.MoveInOutEquipped(false, level); break; } } }
public void MoveIn() { if (level == 0 && curNode.title == menuNode.title) { curCat = (categories)index; } switch (curCat) { case categories.Inventory: PlayerInventory inv = gameObject.GetComponent <PlayerInventory> (); inv.MoveInOutInventory(true, level, index); break; case categories.Player: PlayerEquipped eq = gameObject.GetComponent <PlayerEquipped> (); eq.MoveInOutEquipped(true, level); break; } }