Beispiel #1
0
        public GameMap InitializeFirstMap(Game game)
        {
            this.game = game;
            GameMap map = game.CreateMap(2 * WINDOW_WIDTH, 2 * WINDOW_HEIGHT);

            //Setting up the view
            //NOTE: you almost always want the last two to be window width and height.
            //  If you don't you can get weird effects (which would be desirable only for things like split screen)
            MapView view = new MapView(new GameVector(0, 0), new GameVector(0, 0), WINDOW_WIDTH, WINDOW_HEIGHT);

            map.Views.Add(view);

            GameBase.Graphics.Background background = new GameBase.Graphics.Background("background");

            //Add all the objects to the map
            map.AddObject(background);
            map.AddObject(new Player(view));
            map.AddObject(new SomeRocks(300, 250));
            map.AddObject(new SomeRocks(1430, 500));
            map.AddObject(new SomeRocks(1050, 972));

            map.AddObject(new CardManager(map));

            return(map);
        }
Beispiel #2
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            IGameStateManager manager = new GameManager();

            using (GameBase.Game game = new GameBase.Game(manager, GameManager.WINDOW_WIDTH, GameManager.WINDOW_HEIGHT))
            {
                game.Run();
            }
        }