public ModelScene(GameEngine game) : base(game) { // Create a title sprite to display the name of this scene. title = new VideoFont("Nibiru Engine - Model Demo Scene", @"Fonts\trebuchet", new Vector2(10, 10), Color.White); // Setup a camera to view this scene. Camera = new GameCamera(game, PlayerIndex.One, new Vector3(0, 0, 50), Vector3.Zero, Vector3.Up, 1, 10000, 250.0f); Camera.AllowMove = true; Camera.AllowPitch = true; Camera.AllowYaw = false; Camera.AllowRoll = false; Camera.UseKeyboard = true; // Setup the sky dome that will render a sky/sun around the world. Sky = new GameSkyDome(game, Camera); // Setup a game terrain that will be loaded from the heightmap image. Terrain = new GameTerrain2(game, Camera, Sky, @"Models\terrain", @"Models\ground"); // Create the spaceship avatar that the camera will center around. spaceship = new VideoModel(Camera, @"Models\spaceship"); Attach(title); Attach(spaceship); }
public SpriteScene(GameEngine game) : base(game) { // Create a title sprite to display the name of this scene. title = new VideoFont("Nibiru Engine - Sprite Demo Scene", @"Fonts\trebuchet", new Vector2(10, 10), Color.White); // Create some bouncing rings. rings = new AutomatedSprite(@"Images\threerings", new Vector2(250, 250), Color.White, 75, 75, 0, 6, 8); rings.Speed = new Vector2 (1, 1); // Create a player controlled sprite. skull = new ControlledSprite(PlayerIndex.One, @"Images\skullball", new Vector2(550, 550), Color.White, 75, 75, 0, 6, 8); skull.Speed = new Vector2(2, 2); Attach(title); Attach(rings); Attach(skull); }
public ParticleScene(GameEngine game) : base(game) { // Setup a camera to view this scene. Camera = new GameCamera(game, PlayerIndex.One, new Vector3(0, 0, 0), new Vector3(0, 0, 0), Vector3.Up, 1, 10000, 1.0f); //Camera.CurrentType = VideoCamera.Types.Third; //Camera.Near = 1; //Camera.Far = 10000; // Create a title sprite to display the name of this scene. title = new VideoFont("Nibiru Engine - Particle Demo Scene", @"Fonts\trebuchet", new Vector2(10, 10), Color.White); // Simply change the class of the effect to try out other effects. effect = new VideoParticle(Camera, @"Particles\smoke"); Attach(title); Attach(effect); }