public void Init(Room room) { instruction.Randomize(RNGSingleton.instance.swarm_rng); if (reward_chest != null) { RNG rng = RNGSingleton.instance.loot_rng; reward_chest.SetSpawnPickups(LootTablesSingleton.instance.regular_chest_loot.GetPilePickups(rng)); } home = room; }
public override void Init() { base.Init(); foreach (Transform t in chest_spawns) { if (RNGSingleton.instance.room_gen_rng.GetFloat() < 0.67) { PickupChest new_chest = Instantiate(pickup_chest_prefab); new_chest.transform.position = t.position; new_chest.SetSpawnPickups(LootTablesSingleton.instance.regular_chest_loot.GetPilePickups(RNGSingleton.instance.loot_rng)); new_chest.SetOpenToPlayer(true); } else { ItemChest new_chest = Instantiate(item_chest_prefab); new_chest.transform.position = t.position; new_chest.SetSpawnItem(ItemListSingleton.instance.GetRandomItem(RNGSingleton.instance.item_rng)); } } timed_door.enabled = false; timed_door.SetTimerDisplay(countdown_length); }