void SetLoot(ILootable l) { currentlyLooting = l; foreach (Item i in currentlyLooting.GetLoot()) { LootItemObject temp = Instantiate(prefab, transform.position, Quaternion.identity, transform); temp.SetItem(i); } }
private void Start() { instance = this; prefab = Resources.Load <LootItemObject>("Prefabs/LootItemObject"); }