public static void adder(Game1 game,Game1.gameState _currentState,int width,int height) { if (_currentState == Game1.gameState.MainMenuState) { game.Components.Clear(); var settingsBlueFire = new ParticleSettings(300, new Color(100, 147, 237, 255), new Color(0, 1f, 1f, 0f), 200, 30, 1, (v, t) => Vector2.UnitY * -5 + Vector2.UnitX * 2, pos => pos + ParticleHelper.GetRandomVector() * 10, 2, 0.4f); var BlueFire = new ParticlesMgr(game, settingsBlueFire) { Pos = new Vector2((float)width*0.5f, (float)height*0.45f) }; game.Components.Add(BlueFire); } if ((_currentState == Game1.gameState.Level2)||_currentState==Game1.gameState.Checkpause) { game.Components.Clear(); for (int i = 0; i < 40; i++) { var settingsNeige = new ParticleSettings(2500 + i * 300, new Color(255, 255, 255), new Color(255, 255, 255), 10, 1000, 1, (v, t) => Vector2.UnitY * 10 + Vector2.UnitX * ParticleHelper.GetRandomFloat(-10, 10), pos => pos + ParticleHelper.GetRandomVector(),0.3f,0.3f); var Neige = new ParticlesMgr(game, settingsNeige) { Pos = new Vector2(ParticleHelper.GetRandomFloat(0, 1500), i * -100) }; game.Components.Add(Neige); } } if (_currentState == Game1.gameState.SEU||_currentState==Game1.gameState.Editeur_mapVV||_currentState==Game1.gameState.Pause||_currentState==Game1.gameState.level_Pselect ) { game.Components.Clear(); } }
public static void adder_in_pause(Game1 game) { game.Components.Clear(); var settingsBlueFire = new ParticleSettings(300, new Color(100, 147, 237, 255), new Color(0, 1f, 1f, 0f), 200, 30, 1, (v, t) => Vector2.UnitY * -5 + Vector2.UnitX * 2, pos => pos + ParticleHelper.GetRandomVector() * 10, 2, 0.4f); var BlueFire = new ParticlesMgr(game, settingsBlueFire) { Pos = new Vector2(640, 355) }; game.Components.Add(BlueFire); }
public Particle(ParticlesMgr mgr) { _settings = mgr.Settings; _mgr = mgr; }