]> git.r.bdr.sh - rbdr/super-polarity/blame - SuperPolarity/ParticleEffectFactory.cs
More spaces removed.
[rbdr/super-polarity] / SuperPolarity / ParticleEffectFactory.cs
CommitLineData
38c7d3f9
BB
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using Microsoft.Xna.Framework;
6using Microsoft.Xna.Framework.Graphics;
7
8namespace SuperPolarity
9{
10 static class ParticleEffectFactory
11 {
12 static Game Game;
13 static Random random;
14
15 static ParticleEffectFactory()
16 {
17 random = new Random();
18 }
19
20 public static ParticleEngine CreatePolarCircle(Vector2 location)
21 {
22 List<Texture2D> texturesList = new List<Texture2D>();
23
24 //texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\circle"));
25 texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\diamond"));
26 texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\square"));
27
28 ParticleEngine particleEngine = new ParticleEngine(texturesList, location);
29
30 particleEngine.Color = new Color(239, 203, 204);
31 particleEngine.TTL = 10;
32 particleEngine.TTLRandomFactor = 5;
33 particleEngine.ScatterFactor = 40;
34 particleEngine.ParticleCount = 50;
35 particleEngine.StretchFactor = 2.8f;
36
37
38 return particleEngine;
39 }
40
41 public static ParticleEngine CreateBullet(Vector2 location)
42 {
43 List<Texture2D> texturesList = new List<Texture2D>();
44
45 texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\circle"));
46 //texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\diamond"));
47 texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\square"));
48
49 ParticleEngine particleEngine = new ParticleEngine(texturesList, location);
50
51 particleEngine.Color = Color.Gray;
52 particleEngine.TTL = 5;
53 particleEngine.TTLRandomFactor = 5;
54 particleEngine.ScatterFactor = 5;
55 particleEngine.ParticleCount = 10;
56 particleEngine.StretchFactor = 1;
57
58 return particleEngine;
59 }
60
61 internal static void SetGame(Game game)
62 {
63 ParticleEffectFactory.Game = game;
64 }
65 }
66}