public static CollectableWorld spawnCollectable(Vector3 pos, Collectable c) { Transform item = Instantiate(CollectableList.Instance.PF_CollectableWorld, pos, Quaternion.identity); CollectableWorld cret = item.GetComponent <CollectableWorld>(); cret.setCollectable(c); return(cret); }
private void Awake() { _inventory = new InventorySystem(); CollectableWorld.spawnCollectable(new Vector3(-1, -1, 0), new Gem { amount = 1 }); CollectableWorld.spawnCollectable(new Vector3(-1, 1, 0), new Key { amount = 1 }); }