public Particle (int par1x, int par2y, Color par4color, Sort par5type) { life = 1F; int side = rand.Next (3, 5); if (par5type == Sort.Fog) side = rand.Next (5, 15); link = new Vector2 (par1x, par2y); if (par5type == Sort.Fixed) { int g = rand.Next (1, 3); if (g != 1) g = -1; int h = rand.Next (1, 3); if (h != 1) h = -1; par1x += rand.Next (0, 15) * g; par2y += rand.Next (0, 15) * h; } shape = new Rectangle (par1x, par2y, side, side); position = new Vector2 (shape.X, shape.Y); color = par4color; sprite = new Texture2D (Core.graphicsD, 1, 1); sprite.SetData (new Color[]{ color }); if(par5type != Sort.Fog) light = EffectManager.addLight (new Light (shape.X + shape.Width / 2, shape.Y + shape.Height / 2, side / 10F, color)); else life = 0.3F; type = par5type; }
public Target (Party par1scene, int par2x,int pary) :base(par1scene,par2x,pary,20,20) { if (rand.Next (1, 3) == 1) { sprite = Core.Png [2]; type = Magnet.Gender.Minus; } else { sprite = Core.Png [5]; type = Magnet.Gender.Plus; } if (rand.Next (1, 20) == 1) isHeart = true; boundingboxes = Utils.getBoundingBoxFrom (sprite, shape); light = EffectManager.addLight (new Light (shape.X + shape.Width / 2, shape.Y + shape.Height / 2,0.5F,Color.White)); particles=new Particle[rand.Next(3,6)]; for (int i = 0; i < particles.Length; i++) { particles [i] = EffectManager.addParticle (new Particle (shape.X + shape.Width / 2 + (shape.Width / 2), shape.Y + shape.Height / 2 + (shape.Height / 2), Color.DarkOrange, Particle.Sort.Fixed)); } }
public static void removeLight(Light par1) { lights.Remove (par1); }
public static Light addLight(Light par1) { lights.Add (par1); return par1; }