aboutsummaryrefslogtreecommitdiff
path: root/Super Polarity/ParticleEffectFactory.cs
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2014-02-03 09:51:07 -0600
committerBen Beltran <ben@nsovocal.com>2014-02-03 09:51:07 -0600
commit3de51c6f55d304f038df1b77c8ab346e2a187fe1 (patch)
tree2ce589b8961bdf60c21af2a711365cb06439b13a /Super Polarity/ParticleEffectFactory.cs
parent8534e46e400268c5ceffb3b14f02cef39eedae8f (diff)
parentbca44639c27169b0643de1b56361e6c2958d1d4a (diff)
Merge branch 'master' of github.com:benbeltran/super-polarity
Conflicts: .gitignore
Diffstat (limited to 'Super Polarity/ParticleEffectFactory.cs')
-rw-r--r--Super Polarity/ParticleEffectFactory.cs66
1 files changed, 66 insertions, 0 deletions
diff --git a/Super Polarity/ParticleEffectFactory.cs b/Super Polarity/ParticleEffectFactory.cs
new file mode 100644
index 0000000..0cd9ed3
--- /dev/null
+++ b/Super Polarity/ParticleEffectFactory.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ static class ParticleEffectFactory
+ {
+ static Game Game;
+ static Random random;
+
+ static ParticleEffectFactory()
+ {
+ random = new Random();
+ }
+
+ public static ParticleEngine CreatePolarCircle(Vector2 location)
+ {
+ List<Texture2D> texturesList = new List<Texture2D>();
+
+ //texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\circle"));
+ texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\diamond"));
+ texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\square"));
+
+ ParticleEngine particleEngine = new ParticleEngine(texturesList, location);
+
+ particleEngine.Color = new Color(239, 203, 204);
+ particleEngine.TTL = 10;
+ particleEngine.TTLRandomFactor = 5;
+ particleEngine.ScatterFactor = 40;
+ particleEngine.ParticleCount = 50;
+ particleEngine.StretchFactor = 2.8f;
+
+
+ return particleEngine;
+ }
+
+ public static ParticleEngine CreateBullet(Vector2 location)
+ {
+ List<Texture2D> texturesList = new List<Texture2D>();
+
+ texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\circle"));
+ //texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\diamond"));
+ texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\square"));
+
+ ParticleEngine particleEngine = new ParticleEngine(texturesList, location);
+
+ particleEngine.Color = Color.Gray;
+ particleEngine.TTL = 5;
+ particleEngine.TTLRandomFactor = 5;
+ particleEngine.ScatterFactor = 5;
+ particleEngine.ParticleCount = 10;
+ particleEngine.StretchFactor = 1;
+
+ return particleEngine;
+ }
+
+ internal static void SetGame(Game game)
+ {
+ ParticleEffectFactory.Game = game;
+ }
+ }
+}