private static DynValue HasItem(DynValue itemName) { ItemData item = ItemData.ItemByName(itemName.String); Assert.IsNotNull(item); return(Global.Instance().Lua.Marshal(GGlobal.Instance().Party.Inventory.HasItem(item))); }
private static void DeductItem(DynValue itemName) { ItemData item = ItemData.ItemByName(itemName.String); Assert.IsNotNull(item); GGlobal.Instance().Party.Inventory.DeductItem(item); }
public void Populate() { inventory = GGlobal.Instance().Party.Inventory; categories = ItemCategory.AllCategories(); scrollOffset = 0; categoryCursor = 0; transitioning = false; ItemDescription.text = ""; ImageIcon.sprite = null; ReloadCategory(); categoryMode = (categoryItems.Count == 0); UpdateDisplay(); }
public static Global Instance() { if (instance == null) { GameObject globalObject = new GameObject(); // debug-ish and we don't serialize scenes // globalObject.hideFlags = HideFlags.HideAndDontSave; instance = globalObject.AddComponent <Global>(); instance.InstantiateManagers(); } // this should be the only game/engine binding GGlobal.Instance(); return(instance); }