/// <summary> /// Initializes a new instance of the <see cref="InputManager"/> class. /// </summary> /// <param name="game"> /// The game. /// </param> /// <param name="resolutionManager"> /// The resolution manager. /// </param> public InputManager(Game game, ResolutionManager resolutionManager) : base(game) { this.resolutionManager = resolutionManager; this.keyboardState = Keyboard.GetState(); this.mouseState = Mouse.GetState(); }
/// <summary> /// Initializes a new instance of the <see cref="AsteroidManager"/> class. /// </summary> /// <param name="resolutionManager"> /// The resolution manager. /// </param> /// <param name="randomNumberGenerator"> /// The random number generator. /// </param> /// <param name="isHost"> /// The is host. /// </param> public AsteroidManager( ResolutionManager resolutionManager, IRandomNumberGenerator randomNumberGenerator, bool isHost) { this.isHost = isHost; this.resolutionManager = resolutionManager; this.randomNumberGenerator = randomNumberGenerator; }
/// <summary> /// Initializes a new instance of the <see cref="PlayerManager"/> class. /// </summary> /// <param name="resolutionManager"> /// The resolution manager. /// </param> /// <param name="randomNumberGenerator"> /// The random number generator. /// </param> /// <param name="inputManager"> /// The input manager. /// </param> /// <param name="shotManager"> /// The shot manager. /// </param> /// <param name="isHost"> /// The is host. /// </param> public PlayerManager( ResolutionManager resolutionManager, IRandomNumberGenerator randomNumberGenerator, InputManager inputManager, ShotManager shotManager, bool isHost) { this.resolutionManager = resolutionManager; this.randomNumberGenerator = randomNumberGenerator; this.inputManager = inputManager; this.shotManager = shotManager; this.isHost = isHost; }
/// <summary> /// Initializes a new instance of the <see cref="ShotManager"/> class. /// </summary> /// <param name="resolutionManager"> /// The resolution manager. /// </param> /// <param name="soundManager"> /// The sound manager. /// </param> public ShotManager(ResolutionManager resolutionManager, SoundManager soundManager) { this.resolutionManager = resolutionManager; this.soundManager = soundManager; }
/// <summary> /// Initializes a new instance of the <see cref="ExampleGame"/> class. /// </summary> /// <param name="networkManager"> /// The network manager. /// </param> public ExampleGame(INetworkManager networkManager) { this.graphics = new GraphicsDeviceManager(this) { PreferMultiSampling = true, PreferredBackBufferWidth = 800, PreferredBackBufferHeight = 600 }; this.Window.AllowUserResizing = true; this.Window.ClientSizeChanged += this.WindowClientSizeChanged; this.graphics.ApplyChanges(); this.Content.RootDirectory = "Content"; this.IsMouseVisible = true; this.resolutionManager = new ResolutionManager(); this.resolutionManager.Init(ref this.graphics); this.resolutionManager.SetVirtualResolution(800, 600); this.resolutionManager.SetResolution(800, 600, false); this.networkManager = networkManager; }