예제 #1
0
 public ParticleSpark(Vector2 position)
 {
     Boundary  = new RectangleF(new Vector2(2), position - new Vector2(1));
     _resolver = new CollisionResolver(Globals.TileSize);
     _alpha    = 1f;
     _resolver.move(ref _velocity, new Vector2(2f), Boundary, 0f, new Vector2(0f), new Vector2(0.01f), new Vector2(0.5f), Game1.mapLive.MapMovables, 0.00f);
     _trail    = new RibbonTrail(Boundary.Origin, _velocity, 4, 2, 1, Game1.Textures["RibbonSpark"], null, Game1.Textures["RibbonSpark"]);
     _velocity = new Vector2((float)Globals.GlobalRandom.NextDouble() - 0.5f, (float)Globals.GlobalRandom.NextDouble() - 0.5f);
 }
예제 #2
0
 public ParticleFlameDropBig(Vector2 position, Texture2D tex)
 {
     Boundary  = new RectangleF(new Vector2(16), position - new Vector2(8));
     _resolver = new CollisionResolver(Globals.TileSize);
     _alpha    = 1f;
     _resolver.move(ref _velocity, new Vector2(2f), Boundary, 0f, new Vector2(0f), new Vector2(0.01f), new Vector2(0.5f), Game1.mapLive.MapMovables, 0.00f);
     _velocity = new Vector2((float)Globals.GlobalRandom.NextDouble() - 0.5f, (float)Globals.GlobalRandom.NextDouble() - 0.5f);
     _tex      = tex;
 }
예제 #3
0
 public ParticleBlackDrop(Vector2 origin, Vector2 velocity, Texture2D tex)
 {
     Boundary  = new RectangleF(new Vector2(0), origin - new Vector2(0));
     _resolver = new CollisionResolver(Globals.TileSize);
     _resolver.move(ref _velocity, new Vector2(2f), Boundary, 0f, new Vector2(0f), new Vector2(0.01f), new Vector2(0.5f), Game1.mapLive.MapMovables, 0.00f);
     _tex      = tex;
     _velocity = velocity + new Vector2((float)Globals.GlobalRandom.NextDouble() - 0.5f, (float)Globals.GlobalRandom.NextDouble() - 0.5f);
     _rotation = (float)(Globals.GlobalRandom.NextDouble() - 0.5f) / 8;
     _scale    = 0.5f;
 }