예제 #1
0
파일: Space.cs 프로젝트: davidajulio/hx
 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);
 }
예제 #2
0
파일: Space.cs 프로젝트: davidajulio/hx
 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);
 }