示例#1
0
        public static BaseLevel Generate(bool correct = true)
        {
            var game = new Game();

            var data = new LevelModel()
            {
                Port = new ShipPortModel()
                {
                    Index = 5,
                    Size = 10
                },
                Tracks = new TrackModel[]
                {
                    new TrackModel()
                    {
                        Type = TrackType.Start,
                        Direction = Direction.East,
                        Position = new Vector(0, 0)
                    },
                    new TrackModel()
                    {
                        Type = TrackType.Default,
                        Direction = Direction.East,
                        Position = new Vector((correct ? 1 : 2), 0)
                    }
                }
            };

            var manager = new LevelManager(game);
            return new BaseLevel(manager, data);
        }
示例#2
0
        public Program()
        {
            game = new Game();

            game.Renderer = new FastRenderer(game);
            game.Load();
        }
示例#3
0
        public MenuView(Game game)
            : base("Goudkoorts", "Selecteer één item:")
        {
            Behaviour = ViewBehaviour.Ignore;

            this.game = game;

            Initialize();
        }
示例#4
0
        public static BaseLevel GenerateFromJson()
        {
            var game = new Game(new GameOptions()
            {
                ContentPath = "GoldFeverTests.Content",
                ContentSource = new NamedContentSource("GoldFeverTests")
            });

            game.Load();
            return game.Level;
        }