public TechnologiesController(IBuildingsService buildingsService, ITechnologiesService techService, IPlayerService playerService, ILogicProvider logic) { this.buildingsService = buildingsService; this.techService = techService; this.playerService = playerService; this.logic = logic; }
public void Dispose() { var disposable = _provider as IDisposable; if (disposable != null) disposable.Dispose(); _provider = null; disposable = _repo as IDisposable; if (disposable != null) disposable.Dispose(); _repo = null; if (_crawler != null) { if (IsAsync) { _crawler.PageCrawlStartingAsync -= crawler_ProcessPageCrawlStarting; _crawler.PageCrawlCompletedAsync -= crawler_ProcessPageCrawlCompleted; _crawler.PageCrawlDisallowedAsync -= crawler_PageCrawlDisallowed; _crawler.PageLinksCrawlDisallowedAsync -= crawler_PageLinksCrawlDisallowed; } else { _crawler.PageCrawlStarting -= crawler_ProcessPageCrawlStarting; _crawler.PageCrawlCompleted -= crawler_ProcessPageCrawlCompleted; _crawler.PageCrawlDisallowed -= crawler_PageCrawlDisallowed; _crawler.PageLinksCrawlDisallowed -= crawler_PageLinksCrawlDisallowed; } _crawler = null; } }
public void Dispose() { var disposable = _provider as IDisposable; if (disposable != null) disposable.Dispose(); _provider = null; }
public override void OnStart() { _gameController.ShouldUpdate = true; _getMoreLivesLogicProvider = new GetMoreLivesLogicProvider(this, _gameEngineInterface, _gameController.DataLayer); EULALogicProvider = new EULALogicProvider(this, _gameEngineInterface, _gameController.DataLayer); _logicProvidersByState[MenuState.Loading] = LoadingLogicProvider; _logicProvidersByState[MenuState.ChooseLevel] = ChooseLevelLogicProvider; _logicProvidersByState[MenuState.InMenu] = InMenuLogicProvider; _logicProvidersByState[MenuState.OutOfLives] = OutOfLivesLogicProvider; _logicProvidersByState[MenuState.GetMoreLives] = _getMoreLivesLogicProvider; _logicProvidersByState[MenuState.HowToPlay] = HowToPlayLogicProvider; _logicProvidersByState[MenuState.EULA] = EULALogicProvider; foreach (var curKvp in _logicProvidersByState) { curKvp.Value.OnStart(); } _curLogicProvider = _logicProvidersByState[(MenuState)DefaultSceneState]; SetSceneState(DefaultSceneState); DefaultSceneState = (int)GetDefaultSceneState(); //reset this to the default value. Callers can set DefaultSceneState, but the valueis reset each time we reach OnStart again //_gameEngineInterface.LogToConsole("MenuLogHandler.Start()"); //_curLogicProvider.LogToDebugOutput("OnStart()"); //_curLogicProvider.LogToDebugOutput("Bundle Version Code: " + _gameEngineInterface.AppVersion); //todo real game: make this compatible with iOS too _gameEngineInterface.AppStoreService.LogToDebugOutput = LogToDebugOutput; }
public PlayerService(IRepository<ApplicationUser> users, IRepository<Planet> planets, IRepository<Shard> shards, IRepository<PlayerObject> players, ILogicProvider logic) { this.users = users; this.planets = planets; this.shards = shards; this.players = players; this.logic = logic; }
public MyScheduler(ILogicProvider provider, CrawlerRun definition, IRepository repo) { _provider = provider; _repo = repo; SessionId = definition.SessionId; CrawlerId = definition.CrawlerId; BaseDomain = definition.BaseDomain; }
public FleetController(IPlayerService playerService, IBuildingsService buildingsService, IFleetService fleetService, ITechnologiesService techService, ILogicProvider logic, IBackgroundWorkerService<IFleetService> worker) { this.playerService = playerService; this.buildingsService = buildingsService; this.fleetService = fleetService; this.techService = techService; this.logic = logic; this.worker = worker; }
public void Dispose() { var disposable = _provider as IDisposable; if (disposable != null) disposable.Dispose(); _provider = null; //Do not dispose of the repo if it is passed in by the crawldaddy _repo = null; }
public void Dispose() { var disposable = _provider as IDisposable; if (disposable != null) { disposable.Dispose(); } _provider = null; }
public void Dispose() { var disposable = _provider as IDisposable; if (disposable != null) { disposable.Dispose(); } _provider = null; //Do not dispose of the repo if it is passed in by the crawldaddy _repo = null; }
public override void SetSceneState(int sceneState) { GameState gameState = (GameState)sceneState; var prevLogicProvider = _curLogicProvider; _curLogicProvider = _logicProvidersByGameState[gameState]; if (prevLogicProvider != null) //todo v2: do we need this if statement? seems like prevLogicProvider is never null { prevLogicProvider.ClearInputStates(); //we don't want old input states to still be active when we switch back to the original logic provider prevLogicProvider.OnDeActivate(); } _curLogicProvider.OnActivate(); }
//todo v2: move SetSceneState into base class. This also means you have to move _curLogicProvider and _logicProvidersByGameState into the base class, and make _logicProvidersByGameState have an int key public override void SetSceneState(int sceneState) { MenuState menuState = (MenuState)sceneState; var prevLogicProvider = _curLogicProvider; _curLogicProvider = _logicProvidersByState[menuState]; if (prevLogicProvider != null) { prevLogicProvider.ClearInputStates(); //we don't want old input states to still be active when we switch back to the original logic provider prevLogicProvider.OnDeActivate(); } _curLogicProvider.OnActivate(); }
public void Dispose() { var disposable = _provider as IDisposable; if (disposable != null) { disposable.Dispose(); } _provider = null; disposable = _repo as IDisposable; if (disposable != null) { disposable.Dispose(); } _repo = null; if (_crawler != null) { if (IsAsync) { _crawler.PageCrawlStartingAsync -= crawler_ProcessPageCrawlStarting; _crawler.PageCrawlCompletedAsync -= crawler_ProcessPageCrawlCompleted; _crawler.PageCrawlDisallowedAsync -= crawler_PageCrawlDisallowed; _crawler.PageLinksCrawlDisallowedAsync -= crawler_PageLinksCrawlDisallowed; } else { _crawler.PageCrawlStarting -= crawler_ProcessPageCrawlStarting; _crawler.PageCrawlCompleted -= crawler_ProcessPageCrawlCompleted; _crawler.PageCrawlDisallowed -= crawler_PageCrawlDisallowed; _crawler.PageLinksCrawlDisallowed -= crawler_PageLinksCrawlDisallowed; } _crawler = null; } }
public BuildingService(IRepository<ApplicationUser> users, ILogicProvider logic) { this.users = users; this.logic = logic; }
public CrawlDaddy(ILogicProvider provider, IRepository repo) { _provider = provider; _repo = repo; }
public ParsedLinksProcessor(ILogicProvider provider) { _provider = provider; }
public PreviewController(IPlayerService playerService, ILogicProvider logic) { this.playerService = playerService; this.logic = logic; }
public BuildingsController(IBuildingsService buildingsService, IPlayerService playerService, ILogicProvider logic) { this.buildingsService = buildingsService; this.playerService = playerService; this.logic = logic; }
public TechnologiesService(IRepository<ApplicationUser> users, ILogicProvider logic) { this.users = users; this.logic = logic; }