public GameController(IGameLoader game_load, IGameCreator game_creator, IProvinceLoader province_load, IPlayerLoader player_load) { this.game_load = game_load; this.game_creator = game_creator; this.province_load = province_load; this.player_load = player_load; }
/// <summary> /// Load a game. /// </summary> /// <param name="directory"></param> public void LoadGame(string directory) { var game = GameUtil.GetGameFromPath(directory); switch (game) { case NFSGame.MW: { _loader = new MWLoader(); _loader.Initialize(directory); break; } case NFSGame.World: { _loader = new WorldLoader(); _loader.Initialize(directory); break; } default: throw new Exception($"Unsupported game: {game}"); } }
public override void Construct() { base.Construct(); gameLoader = Container.TryResolve <IGameLoader>(); Assert.That(gameLoader, Is.Not.Null); }
public ConsoleHandler(ConsoleComponent console, IGameLoader gameLoader) { this.console = console; this.gameLoader = gameLoader; //this.engine = engine; this.ConfigureConsole(); }
public GameService(IGameLoader gameLoaderService, IHotelService hotelService, IJailService jailService, ILotteryService lotteryService) { _gameLoaderService = gameLoaderService; _hotelService = hotelService; _jailService = jailService; _lotteryService = lotteryService; }
public GameStrategy(WindowNavigation windowNavigation, IGameLoader gameLoader, WaveStrategy waveStrategy, IResultsUIAdapter resultsUIAdapter) { this.windowNavigation = windowNavigation; this.gameLoader = gameLoader; this.waveStrategy = waveStrategy; this.resultsUIAdapter = resultsUIAdapter; }
public PlayerController(IProvinceLoader province_load, IPlayerLoader player_load, ISessionLoader session, IGameCreator game_creator, IGameLoader game_load) { this.province_load = province_load; this.session = session; this.player_load = player_load; this.game_creator = game_creator; this.game_load = game_load; }
public GameStrategy(WindowNavigation windowNavigation, IGameLoader gameLoader, IList <IGameEndCondition> gameEndConditions, Player.Entities.Player player, DataProvider <ResourcesData> resourcesDataProvider) { this.windowNavigation = windowNavigation; this.gameLoader = gameLoader; this.gameEndConditions = gameEndConditions; this.player = player; this.resourcesDataProvider = resourcesDataProvider; }
/// <summary> /// Loads the game based on parameters. /// </summary> /// <typeparam name="TLoadSource">Source type.</typeparam> /// <param name="canLoad">Object which can load the game.</param> /// <param name="source">Source from which we can load the game.</param> /// <returns>Loaded game.</returns> public static Game Load <TLoadSource>(IGameLoader <TLoadSource> canLoad, TLoadSource source) { byte[] serializedGame = canLoad.LoadGame(source); Game game = (Game)SerializationObjectWrapper.Deserialize(serializedGame).Value; game.ReconstructOriginalGraph(); game.Refresh(); return(game); }
public GameCreator(IProvinceLoader province_load, IGameLoader game_load, IPlayerLoader player_load, Settings settings, IDatabase db, IPowerLoader power_load) { this.province_load = province_load; this.game_load = game_load; this.player_load = player_load; this.settings = settings; this.db = db; this.power_load = power_load; }
public NewGame(ISettingsLoader sl, IPlayersLoader players, IProvincesLoader provinces, IActionLoader actions, IActivePlayer active, IPowersLoader powers, ILoginSession login, IGameLoader game, IFormerPlayersLoader former) { this.sl = sl; this.players = players; this.provinces = provinces; this.actions = actions; this.active = active; this.powers = powers; this.login = login; this.game = game; this.former = former; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { //// Create a new SpriteBatch, which can be used to draw textures. this.spriteBatch = new SpriteBatch(this.GraphicsDevice); //// this.graphicsEngine = new GraphicsEngine(this.spriteBatch); this.controller = new ControllerUserInput(); ITextureHandler textureHandler = new TextureHandler(this.Content); IPaintInterface painter = new PaintBrush(textureHandler, this.graphicsEngine); this.engine = new Engine(this.controller, painter); //// this.gameLoader = new GameLoader(new UnitOfWork(), this.engine); this.consoleHandler = new ConsoleHandler(this.console, this.gameLoader); }
/// <summary> /// Initializes a new instance of the <see cref="MainForm"/> class. /// </summary> public MainForm() { SetStyle(ControlStyles.OptimizedDoubleBuffer, true); InitializeComponent(); Size s = Size; ResizeEnd += (sender, args) => { this.Refresh(); }; ResizeBegin += (sender, args) => { s = Size; }; Resize += (sender, args) => { int m = Math.Max(Size.Width, Size.Height); if (Size.Width < s.Width || Size.Height < s.Height) { m = Math.Min(Size.Width, Size.Height); } Size = new Size(m, m + 50); }; _gameLoader = new GameLoader(); _playerLoader = new PlayerLoader(); LoadMainMenu(); }
public void UnregisterGameLoader(IGameLoader gameLoader, Gtk.MenuItem item) { gameLoaders.Remove (gameLoader); RemoveFromFileMenu (item); }
public bool RegisterGameLoader(IGameLoader gameLoader, Gtk.MenuItem item) { gameLoaders.Add (gameLoader); return AddToMenu (menubar.fileMenuItem, item, menubar.fileOpenSeparator); }
public MainMenuController(IAppStateManager appStateManager, IGameLoader gameLoader) { _appStateManager = appStateManager; _gameLoader = gameLoader; }
public FactoryCore(IGameLoader gameLoader) { _gameLoader = gameLoader; }
public GameStateManager(IGameLoader loader) { _loader = loader; }
public static async Task <Game> LoadAsync <TLoadSource>(IGameLoader <TLoadSource> canLoad, TLoadSource source) { throw new NotImplementedException(); }
/// <summary> /// Adds a job to the queue. /// </summary> /// <param name="job"></param> public void AddJob(IGameLoader job) { this.Jobs.Enqueue(job); }
/// <summary> /// Resets the game manager and the VFS. /// </summary> public void Reset() { _loader = null; VfsManager.Instance.Reset(); }
/// <summary> /// Adds a job to the queue. /// </summary> /// <param name="job"></param> public void AddJob(IGameLoader job) { this.JobCount += job.GetTotalOperations(); this.Jobs.Enqueue(job); }
public void RegisterGameLoader(IGameLoader loader) { this.gameLoaders.Add(loader); }