private void Start() { inventory = (LinearInventory)GameObject.FindObjectOfType <LinearInventory>(); if (inventory == null) { Debug.LogError("There is no player with an inventory"); } }
private void Awake() { playerInventory = this; }
private void Start() { playerInventory = (LinearInventory)FindObjectOfType <LinearInventory>(); shopInv.Add(ItemData.CreateItem(Random.Range(0, 2))); shopInv.Add(ItemData.CreateItem(Random.Range(100, 102))); }