public void PlayEffect(string type, float x, float y, Color blend) { if (type == "Explosion_01") { foreach (GameEffect gfx in mExplosions) { if (!gfx.mIsActive) { gfx.PlayAtPos(x, y, blend); return; } } //Failed to find one mTmp = new GameEffect(aaGameWorld, type, x, y); mExplosions.Add(mTmp); mTmp.PlayAtPos(x, y, blend); return; } else if (type == "Explosion_02") { foreach (GameEffect gfx in mExplosions) { if (!gfx.mIsActive) { gfx.PlayAtPos(x, y, blend); //return; } } //Failed to find one mTmp = new GameEffect(aaGameWorld, type, x, y); mExplosions.Add(mTmp); mTmp.PlayAtPos(x, y, blend); return; } else if (type == "QuickFix") { foreach (GameEffect gfx in mExplosions) { if (!gfx.mIsActive) { gfx.PlayAtPos(x, y, blend); //return; } } //Failed to find one mTmp = new GameEffect(aaGameWorld, type, x, y); mExplosions.Add(mTmp); mTmp.PlayAtPos(x, y, blend); return; } else { // Console.WriteLine("GameEffect type not recognized, failed to play"); } }