// Dependancy injection resolves all the variables the constructor takes in public DetailedPageBackend(ICheckConnection checkConnection, IGameProxy gameProxy, ICustomGameProxy customGameProxy, IWishlistPlayedProxy wishlistPlayedProxy) { _checkConnection = checkConnection; _gameProxy = gameProxy; _customGameProxy = customGameProxy; _wishlistPlayedProxy = wishlistPlayedProxy; }
public GraphicsHandler(IGameProxy gameProxy, IGraphicsDeviceManager graphicsDeviceManager) { _game = gameProxy; _game.LoadContentEvent += LoadContent; _game.DrawEvent += Draw; ((GraphicsDeviceManager)graphicsDeviceManager).PreparingDeviceSettings += PreparingDeviceSettings; }
public void Init() { _uut = new GameProxy(_fakeHttpRequestFactory.Object); _username = "******"; _password = "******"; _gameId = "GameIdString"; }
public GameHandler(IGameProxy gameProxy, GraphicsHandler graphicsHandler, Barbarian barbarian) { _graphicsHandler = graphicsHandler; _game = gameProxy; _game.Window.Title = "Barbarian"; _game.InitializeEvent += Initialize; _game.UpdateEvent += Update; _barbarian = barbarian; }
public WalkingAnimation(IGameProxy gameProxy) { _game = gameProxy; _game.LoadContentEvent += LoadContentEvent; _frameSequence = new int[] { 0, 1, 2, 3 }; _frameHeight = 63; _frameWidth = 48; _frameTime = 100; _isLooping = false; }
public GameAPI(IGameFactory gameFactory, IPlayerFactory playerFactory, ILogger logger, IGameProxy proxy) { Requires.IsNotNull(gameFactory, "gameFactory"); Requires.IsNotNull(playerFactory, "playerFactory"); this.gameFactory = gameFactory; this.playerFactory = playerFactory; this.proxy = proxy; this.logger = logger; }
public AnimationHandler(IGameProxy gameProxy, IGraphicsDeviceManager graphicsDeviceManager) { _game = gameProxy; _game.DrawEvent += Draw; _game.UpdateEvent += Update; _game.LoadContentEvent += LoadContent; _barbarianTexture = new AnimatedTexture (new AssetValues { ContentName = "Barbarian/Walking", FrameCount = 4, Depth = 0.5f, Rotation = 0.0f, Scale = 1.0f, Origin = _shipPos, TimePerFrame = 6.0f }); }
public async Task <bool> VerifyConnection() { try { var sampleTestValue = 123; var verifyConnection = proxy?.VerifyConnection(sampleTestValue); if (verifyConnection != null && await verifyConnection == sampleTestValue) { return(true); } } catch (Exception ex) { logger?.Error(StringResources.VerifyConnectionFailed(ex.Message)); logger?.Error(ex); } proxy = null; return(false); }
public SearchBackend(ICheckConnection checkConnection, IGameProxy gameProxy, ICustomGameProxy customGameProxy) { _checkConnection = checkConnection; _gameProxy = gameProxy; _customGameProxy = customGameProxy; }