public void tryPickupLoot(Loot loot) { if (loot.lootType != LootType.NONE) { Messenger.Broadcast(DungeonEvent.PICKUP_LOOT); switch (loot.lootType) { case LootType.DAGGER: pickUpItem(new Dagger());//TODO etter way to make/pickup loot break; case LootType.SWORD: pickUpItem(new Sword());//TODO etter way to make/pickup loot break; case LootType.SHIELD: pickUpItem(new Shield());//TODO etter way to make/pickup loot break; } } }
private static void addLoot(GameObject room, Loot loot) { GameObject lootObj = GameObject.Instantiate(Resources.Load("dungeon/loot/genericLoot", typeof(GameObject))) as GameObject; lootObj.centerScale(room.transform); }