コード例 #1
0
 // 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;
 }
コード例 #2
0
ファイル: GraphicsHandler.cs プロジェクト: sllabres/Barbarian
 public GraphicsHandler(IGameProxy gameProxy, IGraphicsDeviceManager graphicsDeviceManager)
 {
     _game = gameProxy;
     _game.LoadContentEvent += LoadContent;
     _game.DrawEvent += Draw;
     ((GraphicsDeviceManager)graphicsDeviceManager).PreparingDeviceSettings += PreparingDeviceSettings;
 }
コード例 #3
0
 public void Init()
 {
     _uut      = new GameProxy(_fakeHttpRequestFactory.Object);
     _username = "******";
     _password = "******";
     _gameId   = "GameIdString";
 }
コード例 #4
0
ファイル: GameHandler.cs プロジェクト: sllabres/Barbarian
 public GameHandler(IGameProxy gameProxy, GraphicsHandler graphicsHandler, Barbarian barbarian)
 {
     _graphicsHandler = graphicsHandler;
     _game = gameProxy;
     _game.Window.Title = "Barbarian";
     _game.InitializeEvent += Initialize;
     _game.UpdateEvent += Update;
     _barbarian = barbarian;
 }
コード例 #5
0
 public WalkingAnimation(IGameProxy gameProxy)
 {
     _game = gameProxy;
     _game.LoadContentEvent += LoadContentEvent;
     _frameSequence = new int[] { 0, 1, 2, 3 };
     _frameHeight = 63;
     _frameWidth = 48;
     _frameTime = 100;
     _isLooping = false;
 }
コード例 #6
0
        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;
        }
コード例 #7
0
        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
                });
        }
コード例 #8
0
 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);
 }
コード例 #9
0
 public SearchBackend(ICheckConnection checkConnection, IGameProxy gameProxy, ICustomGameProxy customGameProxy)
 {
     _checkConnection = checkConnection;
     _gameProxy       = gameProxy;
     _customGameProxy = customGameProxy;
 }