public void loadContent(ContentManager pContent) { ParticleEffect.loadContent(pContent); for (int i = 0; i < MAX_EFFECTS; i++) { mAllEffects[i] = new ParticleEffect(); } for (int i = 0; i < MAX_PARTICLES; i++) { mParticles[i] = new Particle(); } }
public void initialize(EffectType pType, Vector2 pOrigin, ref Particle[] particleCollection, float angle = 0.0f) { mParticles = particleCollection; mType = pType; mOrigin = pOrigin; mAngle = angle; switch (mType) { case EffectType.explosionOnGround: initFountain(); break; case EffectType.explosionFromCannon: initExplosion(); break; } }