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()); }
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); }
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); }