Example #1
0
 public Space()
 {
     graphics = new GraphicsDeviceManager(this);
     content = new ContentManager(Services);
     InputManager playerInput = new InputManager(this, EventType.Keyboard | EventType.Voice);
     player = new Player(this, content, playerInput, null);
     camera = new Camera(this);
     background = new Background(this, content, playerInput);
     shotManager = new ShotManager(this, content);
     player.Position = Vector3.Zero;
     player.Transform = Matrix.Identity;
     Components.Add(background);
     Components.Add(playerInput);
     Components.Add(player);
     Components.Add(camera);
     Components.Add(shotManager);
 }
Example #2
0
 public Space(NetworkClient other)
 {
     graphics = new GraphicsDeviceManager(this);
     content = new ContentManager(Services);
     InputManager playerInput = new InputManager(this, EventType.Keyboard);
     player = new Player(this, content, playerInput, other);
     enemy = new Enemy(this, content, NetworkInput.Instance);
     camera = new Camera(this);
     background = new Background(this, content, playerInput);
     shotManager = new ShotManager(this, content);
     player.Position = enemy.Position = Vector3.Zero;
     player.Transform = enemy.Transform = Matrix.Identity;
     Components.Add(background);
     Components.Add(playerInput);
     Components.Add(player);
     Components.Add(enemy);
     Components.Add(camera);
     Components.Add(shotManager);
 }