Ejemplo n.º 1
0
		public Player (Party par5scene,int par1x,int par2y,int par3w,int par4h)
			:base(par5scene,par1x,par2y,par3w,par4h)
		{
			sprite = Core.Png [0];
			boundingboxes=Utils.getBoundingBoxFrom (sprite,shape);
			type = Magnet.Gender.Minus;
		}
Ejemplo n.º 2
0
		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));
			}
		}
Ejemplo n.º 3
0
		public void change()
		{
			if (changeTime > 0)
				return;
			changeTime = 10;
			if (type == Magnet.Gender.Minus) {
				type = Magnet.Gender.Plus;
				sprite = Core.Png [1];
			} else {
				type = Magnet.Gender.Minus;
				sprite = Core.Png [0];
			}
		}