public Player(Game game, String assetName, LightSource light) : base(game, assetName, light) { thrust = gameOptions.Thrust; gravity = gameOptions.Gravity; particleLibrary = null; deathTimer = 50; lifeCounter = 1; }
protected void InitParticles() { explosionParticles = new ExplosionParticleSystem(game, game.Content); explosionSmokeParticles = new ExplosionSmokeParticleSystem(game, game.Content); energyParticles = new EnergyParticleSystem(game, game.Content); particleLibrary = new ParticleLibrary(); explosionSmokeParticles.DrawOrder = 200; energyParticles.DrawOrder = 300; explosionParticles.DrawOrder = 400; game.Components.Add(explosionParticles); game.Components.Add(explosionSmokeParticles); game.Components.Add(energyParticles); particleLibrary.ExplosionParticles = explosionParticles; particleLibrary.ExplosionSmokeParticles = explosionSmokeParticles; particleLibrary.EnergyParticles = energyParticles; }
public Level(Game game, ParticleLibrary _particleEffects, ref SoundPlayer _soundPlayer, Scene _scene, Player _playerOne, int peeps, int _levelNumber) { levelNumber = _levelNumber; particleEffects = _particleEffects; peepsLeft = peeps; scene = _scene; scene.Camera.ResetCamera(); soundPlayer = _soundPlayer; map = new Map(game, new Vector3(8, 7, 4), scene.Light, peepsLeft); playerOne = _playerOne; playerOne.SetStartPosition(map.GetPlayerStartPosition()); playerOne.SetPlayArea(map.GetPlayArea()); playerOne.AttachParticleLibrary(particleEffects); playerOne.AttachSoundPlayer(ref _soundPlayer); playerOne.Reset(); playerCollisionCheck = CollisionType.None; skybox = new Base3DObject(game, "Models/skybox", scene.Light); gameHud = new Hud(game.Content, game.GraphicsDevice.Viewport.TitleSafeArea); }
public void AttachParticleLibrary(ParticleLibrary _particleLibrary) { particleLibrary = _particleLibrary; }