// TO-DO: Generate Level based on current level private void GenerateLevel(int level_number, Style style) { Level new_level; switch (style) { case Style.Standart: new_level = new Standart(); break; case Style.SimpleShort: new_level = new SimpleShort(); break; case Style.SimpleLong: new_level = new SimpleLong(); break; case Style.ComplexShort: new_level = new ComplexShort(); break; case Style.ComplexLong: new_level = new ComplexLong(); break; case Style.GoldRich: new_level = new GoldRich(); break; default: new_level = new Standart(); break; } generated_levels.Add(level_number, new_level); Segment station = SpawnSegment("station"); new_level.start_station = station; new_level.level_state = LevelState.Queued; new_level.number = level_number; new_level.GenerateTracks(); if (generated_levels.ContainsKey(level_number - 1)) { Level prev_level = generated_levels[level_number - 1]; prev_level.end_station = station; } //GenerateTrees(new_level.start_station,new_level.end_station); //GenerateCows(new_level.start_station,new_level.end_station); tracks_object.UpdateArrays(); //GameHandler.UpdateNextJunction(); game_handler.AddLevel(new_level); }