public static void ComponentTest() { XEngineComponentTest testGame = new XEngineComponentTest(false); Camera camera = new Camera( testGame ); testGame.Components.Add( camera ); testGame.Run(); }
public static void ComponentTest() { XEngineComponentTest testGame = new XEngineComponentTest(false); // Init Camera Camera camera = new Camera( testGame ); testGame.Components.Add( camera ); ServiceLocator.Camera = camera; testGame.Components.Add( new DebugHUD( testGame ) ); testGame.Run(); }
public static void ComponentTest() { XEngineComponentTest testGame = new XEngineComponentTest( false ); // Initialize Camera Camera camera = new Camera( testGame ); testGame.Components.Add( camera ); ServiceLocator.Camera = camera; // Initialize InputManager InputManager inputManager = new InputManager( testGame ); testGame.Components.Add( inputManager ); ServiceLocator.InputManager = inputManager; // Initialize DebugHUD testGame.Components.Add( new DebugHUD( testGame ) ); testGame.Components.Add( new CameraController( testGame ) ); testGame.Run(); }
public static void ComponentTest() { XEngineComponentTest testGame = new XEngineComponentTest( false ); // Initialize Camera Camera camera = new Camera( testGame ); testGame.Components.Add( camera ); ServiceLocator.Camera = camera; // Initialize InputManager InputManager inputManager = new InputManager( testGame ); inputManager.traceEnabled = true; testGame.Components.Add( inputManager ); testGame.UpdateDelegate = delegate( GameTime gameTime ) { inputManager.isKeyPressed( Keys.A ); inputManager.isMouseLeftPressed(); inputManager.isMouseRightDown(); inputManager.isKeyDown( Keys.Space ); }; testGame.Run(); }
protected override void Initialize() { if ( m_setupDefaultComponents ) { // Initialize Camera Camera camera = new Camera( this ); this.Components.Add( camera ); ServiceLocator.Camera = camera; // Initialize InputManager InputManager inputManager = new InputManager( this ); this.Components.Add( inputManager ); ServiceLocator.InputManager = inputManager; // Initialize CameraController this.Components.Add( CameraController.Factory( m_cameraType, this) ); // Initialize EntityManager EntityManager entityManager = new EntityManager( this ); this.Components.Add( entityManager ); ServiceLocator.EntityManager = entityManager; // Initialize Scenegraph ScenegraphManager scenegraph = new ScenegraphManager( this ); this.Components.Add( scenegraph ); ServiceLocator.ScenegraphManager = scenegraph; // Initialize DebugHUD DebugHUD debugHUD = new DebugHUD( this ); this.Components.Add( new DebugHUD( this ) ); // Initialize SettingsManager ServiceLocator.SettingsManager = new SettingsManager(); } base.Initialize(); if (m_initDelegate != null) { m_initDelegate(); } }