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); }
/// <summary> /// Constructor for the player manager. Creates all four engine players. /// </summary> /// <param name="engine"></param> public PlayerManager(GameEngine engine) : base(engine) { players = new GamePlayer[4]; players[0] = new GamePlayer(PlayerIndex.One); players[1] = new GamePlayer(PlayerIndex.Two); players[2] = new GamePlayer(PlayerIndex.Three); players[3] = new GamePlayer(PlayerIndex.Four); }
internal ContentCache(GameEngine game) { this.game = game; // Create all the dictionaries that we need. textures = new Dictionary<string, Texture2D>(); models = new Dictionary<string, Model>(); fonts = new Dictionary<string, SpriteFont>(); effects = new Dictionary<string, Effect>(); skies = new Dictionary<string, SkyContent>(); particles = new Dictionary<string, ParticleContent>(); }
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); }
/// <summary> /// Abstract constructor for a manager, requires a game engine. /// </summary> /// <param name="engine"></param> public AbstractManager(GameEngine game) : base(game) { }
public SoundManager(GameEngine engine) : base(engine) { }
public ModelManager(GameEngine engine) : base(engine) { modelList = new List<IEngineModel>(); }
/// <summary> /// Constructor for a new scene manager, requires the game engine. /// </summary> /// <param name="engine"></param> public SceneManager(GameEngine engine) : base(engine) { scenes = new List<GameScene>(); //UpdateOrder = 1; }
public ParticleManager(GameEngine game) : base(game) { particles = new List<IEngineParticle>(); }
/// <summary> /// Constructor for a sprite manager, requires a game engine. /// </summary> /// <param name="game"></param> public SpriteManager(GameEngine game) : base(game) { spriteList = new List<IEngineSprite>(); }
/// <summary> /// Constructor for game configuration object. Needs the game engine. /// </summary> /// <param name="game">The game engine this configuration belongs to.</param> public GameConfig(GameEngine game) { this.game = game; }