// Start is called before the first frame update void Start() { part = PlayerPrefs.GetInt("Level"); Gen = GetComponent <WorldGen>(); Gen.SetStyle(level); if (level == Config.BULLET) { Train.SetMode(Config.BULLET); Player.SetMode(Config.BULLET); FindObjectOfType <AudioManager2>().setLevel(3); } else if (level == Config.DIESEL) { Train.SetMode(Config.DIESEL); Player.SetMode(Config.DIESEL); FindObjectOfType <AudioManager2>().setLevel(2); } else if (level == Config.STEAM) { Train.SetMode(Config.STEAM); Player.SetMode(Config.STEAM); FindObjectOfType <AudioManager2>().setLevel(1); if (part == 1) { Train.Coal.SetFuelAmount(Config.CoalToUseP1); } else if (part == 2) { Train.Coal.SetFuelAmount(Config.CoalToUseP2); } else if (part == 2) { Train.Coal.SetFuelAmount(Config.CoalToUseP3); } } // stations if (part == 1) { Gen.GenStation(2, 1, Train); } else if (part == 2) { Gen.GenStation(3, 2, Train); } else if (part == 3) { Gen.GenStation(6, 3, Train); } }