]> git.r.bdr.sh - rbdr/super-polarity/blobdiff - SuperPolarityMac/ParticleEffectFactory.cs
Removes spaces.
[rbdr/super-polarity] / SuperPolarityMac / ParticleEffectFactory.cs
diff --git a/SuperPolarityMac/ParticleEffectFactory.cs b/SuperPolarityMac/ParticleEffectFactory.cs
new file mode 100644 (file)
index 0000000..0cd9ed3
--- /dev/null
@@ -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;
+        }
+    }
+}