public void SlotDrop(PlayerController player) { // Game ending slot drop. if (golden_slot && player.IsTitan()) { pc_manager.EndGame(); return; } else { // Close the slot. Close(); } // Chance to infect the PC. if (Random.Range(0, percentile) < infection_chance) { pc_manager.IncrementVirusBar(); GameObject.FindObjectOfType <AudioManager>().PlayOneShot("laughing_skull"); loadout_factory.AssignLoadout(player, "Broken"); } else { loadout_factory.AssignRandomLoadout(player); } if (player.TitanReady()) { loadout_factory.AssignLoadout(player, "Gold"); player.EnableTitan(); } // Fully heal player. player.Damage(-(player.max_player_health - player.GetHealth())); }