Beispiel #1
0
        IEnumerable <Updraw> Level(int level)
        {
            Race race;

            while (true)
            {
                yield return(race = TrackFile.LoadTrack(level));

                getOutCutscene = false;
                if (race.won.Value)
                {
                    break;
                }
            }
        }
Beispiel #2
0
        public IEnumerable <Updraw> WholeGame()
        {
            if (editorLevel > 0)
            {
                getOutCutscene = false;
                yield return(TrackFile.LoadTrack(editorLevel));

                yield break;
            }
            //int w = 100;
            //int h = 100;d

            //List<Entity> entities = new List<Entity>()
            //{
            //    new Player(new Vector2(w,h) / 2f * Tile.size)
            //};
            //entities.Add(new House(new M_Rectangle(10, 10, 100, 100)));


            yield return(new TuningScreenBefore1());

            foreach (var item in Level(level = 1))
            {
                yield return(item);
            }
            yield return(new TuningScreenBefore2());

            foreach (var item in Level(level = 2))
            {
                yield return(item);
            }
            yield return(new TuningScreenBefore3());

            foreach (var item in Level(level = 3))
            {
                yield return(item);
            }
            yield return(new TuningScreenEnd());

            yield return(new ScreenEnd());
        }