Exemplo n.º 1
0
        public void Setup()
        {
            // Arrange
            var gameMetadata        = new GameConfigCache();
            var presentationContext = new GlobalContextPresentation();

            CallContext <GameConfigCache> .SetData("GameMetadata", gameMetadata);

            CallContext <GlobalContextPresentation> .SetData("GlobalContextPresentation", presentationContext);

            var world = new World(60, 40, new Faction(1));

            _worldView = new WorldView(world, CameraClampMode.AutoClamp, new InputHandler());
        }
Exemplo n.º 2
0
        public void Setup()
        {
            // Arrange
            var gameMetadata        = new GameConfigCache();
            var presentationContext = new GlobalContextPresentation();

            CallContext <GameConfigCache> .SetData("GameMetadata", gameMetadata);

            CallContext <GlobalContextPresentation> .SetData("GlobalContextPresentation", presentationContext);

            _phoenixGameView = new PhoenixGameView();

            ContentManager content = new ContentManager(null);

            _phoenixGameView.LoadContent(content);
        }
Exemplo n.º 3
0
        public MainGame(PointI desiredResolution)
        {
            _graphicsDeviceManager = new GraphicsDeviceManager(this);
            Content.RootDirectory  = "Content";

            var gameConfigRepository = new GameConfigRepository();

            CallContext <GameConfigRepository> .SetData("GameConfigRepository", gameConfigRepository);

            var gameConfigCache = new GameConfigCache();

            CallContext <GameConfigCache> .SetData("GameConfigCache", gameConfigCache);

            var gameDataRepository = new GameDataRepository();

            CallContext <GameDataRepository> .SetData("GameDataRepository", gameDataRepository);

            var presentationContext = new GlobalContextPresentation {
                DesiredResolution = desiredResolution
            };

            CallContext <GlobalContextPresentation> .SetData("GlobalContextPresentation", presentationContext);
        }