public ExplosionManager(Game game) { explosions = new List <ParticleExplosion>(); explosionSetting = new ExplosionSetting(); expParticleSetting = new ExplosionParticleSettings(); //texture= game.Content.Load<Texture2D>("textures\\Particle"); //effect = game.Content.Load<Effect>("Effect\\Explosion"); //effect.CurrentTechnique = effect.Techniques["Textured"]; //effect.Parameters["theTexture"].SetValue(texture); }
public ParticleExplosion(GraphicsDevice graphicsDevice, Vector3 position, int lifeLeft, int roundTime, int numParticlesPerRound, int maxParticles, Vector2 textureSize, ExplosionParticleSettings particleSettings, float maxRadius, float maxVelocity) { this.position = position; this.graphicsDevice = graphicsDevice; this.lifeLeft = lifeLeft; this.numParticlesPerRound = numParticlesPerRound; this.maxParticles = maxParticles; this.roundTime = roundTime; this.textureSize = textureSize; this.particleSettings = particleSettings; this.maxRadius = maxRadius; this.maxVelocity = maxVelocity; vertexDeclaration = new VertexDeclaration(new VertexElement[] {}); particles = new ParticleExp[maxParticles]; InitializeParticles(); }