public EntityBrokenBlock(PointF p, Object[] mpts, byte[,,] mp, EntityList par)
     : base(p, mpts, mp, par)
 {
     Velocity.X = DX.GetRand(4) - 2;
     Velocity.Y = -DX.GetRand(5) - 5;
     SetGraphic(DevelopUtility.GetRandom(18, 19, 50, 51));
 }
 public EntityParticleBase(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
 {
     Location = pnt;
     Mpts = obj;
     Map = chips;
     Parent = par;
     Size = new Size(8, 8);
 }
示例#3
0
		public EntityItemSpawner(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			Size = new Size(16, 16);
		}
 public EntityStrangeFlower(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
 {
     Location = pnt;
     Mpts = obj;
     Map = chips;
     Parent = par;
     Size = new Size(48, 48);
 }
 public EntityArrow(PointF pnt, Object[] obj, byte[,,] chps, EntityList par)
 {
     Mpts = obj;
     Map = chps;
     Parent = par;
     Location = pnt;
     SetGraphic(0);
     Velocity.X = -2;
 }
 public EntitySpider(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
 {
     Location = new PointF(pnt.X, pnt.Y + 64);
     Mpts = obj;
     Map = chips;
     Parent = par;
     Size = new Size(16, 16);
     CollisionAIs.Add(new AiKillDefender(this));
 }
 public EntityArcher(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
 {
     Location = pnt;
     Mpts = obj;
     Map = chips;
     Parent = par;
     Size = new Size(32, 32);
     MainAi = new AiArch(this);
     CollisionAIs.Add(new AiKillDefender(this));
 }
 public EntityCameraMan(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
 {
     Location = pnt;
     Mpts = obj;
     Map = chips;
     Parent = par;
     Size = new Size(16, 32);
     CollisionAIs.Add(new AiKillDefender(this));
     Jump();
 }
 public EntityFighter(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
 {
     Location = pnt;
     Mpts = obj;
     Map = chips;
     Parent = par;
     Size = new Size(16, 32);
     CollisionAIs.Add(new AiKillDefender(this));
     SetAnime(0, 1, 8);
 }
 public EntityModokee(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
 {
     Location = pnt;
     Mpts = obj;
     Map = chips;
     Parent = par;
     Size = new Size(32, 16);
     MainAi = new AiFlySine(this, 1, 0, 1, 4, 5);
     CollisionAIs.Add(new AiKillDefender(this));
 }
 public EntityDensy(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
 {
     Location = pnt;
     Mpts = obj;
     Map = chips;
     Parent = par;
     Size = new Size(16, 16);
     MainAi = new AiFlySearch(this, 2, 0, 3, 0, 3);
     CollisionAIs.Add(new AiKillDefender(this));
 }
 public EntityBunyo(PointF pnt, Object[] obj, byte[,,] chps, EntityList par)
 {
     Mpts = obj;
     Map = chps;
     Parent = par;
     Location = pnt;
     MainAi = new AiWalk(this, 1, 0, 1, 4, 5);
     CollisionAIs.Add(new AiKillDefender(this));
     Size = new Size(16, 16);
 }
        public EntityTurcos(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
        {
            Location = pnt;
            Mpts = obj;
            Map = chips;
            Parent = par;

            Size = new Size(24, 16);
            MainAi = new AiWalk(this, 1, 0, 1, 3, 4);
            CollisionAIs.Add(new AiKillDefender(this));
        }
		public EntityQueenBoss(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			CollisionAIs.Add(new AiKillDefender(this));
			InternalGravity = 0.1f;
			IsOnLand = true;
			_firstLoc = pnt;
			Tick = 50;
			_left = _firstLoc.X - 200;
			Size = new Size(12, 30);
		}
示例#15
0
		public EntityFireWeapon(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			Size = new Size(8, 8);
			SetAnime(3, 6, 8);
			var vec = new Vector();
			if (GameEngine.Ks.Inup)
				vec.Y = -1;
			if (GameEngine.Ks.Indown)
				vec.Y = 1;
			if (GameEngine.Ks.Inleft)
				vec.X = -1;
			else if (GameEngine.Ks.Inright)
				vec.X = 1;

			vec *= 4f;

			Velocity = vec;
		}
		public EntityPlayingCard(PointF pnt, Object[] obj, byte[,,] chips, EntityList par) : base(pnt, obj, chips, par)
		{
			if (DX.GetRand(2) == 0)
				SetAnime(21, 24, 8);
			else
				SetAnime(25, 28, 8);
		}
		public EntityCircusBall(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			Velocity.Y = -3.0f;
			Size = new Size(16, 16);
			MainAi = new AiKillDefender(this);
			SetGraphic(GetRandom(17, 18, 19));
		}
示例#18
0
		public EntityCoin(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			Size = new Size(16, 16);
			SetAnime(6, 9, 8);

			Velocity.Y = -12;
		}
		public EntityKingBoss(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			CollisionAIs.Add(new AiKillDefender(this));
			InternalGravity = 0.1f;
			IsOnLand = true;
			_firstLoc = pnt;
			Tick = 50;
			_left = _firstLoc.X - 192;
			_top = _firstLoc.Y - 128;
			Size = new Size(12, 30);

			var a = (_firstLoc.X - _left) / 5;
			_waza1 = _left + a;
			_waza2 = _waza1 + a;
			_waza3 = _waza2 + a;
		}
示例#20
0
		public EntityGrimoire(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			Size = new Size(16, 16);
			SetAnime(10, 13, 8);
			Velocity = new Vector(0, -2.0f);
		}
示例#21
0
		public EntityFeather(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			Size = new Size(16, 16);
			SetGraphic(5);
			Velocity = new Vector(0, -0.9f);
			MainAi = new AiWalk(this, 1, 5, 5, 5, 5);
		}
示例#22
0
		public EntityPoisonMushroom(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			Size = new Size(16, 16);
			MainAi = new AiWalk(this, -1, 4, 4, 4, 4);
		}
示例#23
0
		public EntityIcyPendant(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			Size = new Size(16, 16);
			SetGraphic(4);
		}
 public EntityCaveModokee(PointF pnt, Object[] objs, byte[,,] chips, EntityList par)
     : base(pnt, objs, chips, par)
 {
     MainAi = new AiFlySearch(this, 1, 0, 1, 4, 5);
 }
示例#25
0
		public EntityChocolate(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			Size = new Size(16, 16);
			Velocity = new Vector(0, -2.4f);
			SetGraphic(5);
		}
示例#26
0
		public EntityLeafWeapon(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
		{
			Location = pnt;
			Mpts = obj;
			Map = chips;
			Parent = par;
			Size = new Size(8, 8);
			SetGraphic(2);
			Entity ent = null;
			var min = float.MaxValue;

			if (Parent.Count(en => en is EntityLeafWeapon) > 3)
				Kill();

			foreach (var e in from entity in Parent
				where entity.MyGroup == EntityGroup.Enemy
				select entity)
				if (Math.Abs(Location.X - e.Location.X) < min)
				{
					min = Math.Abs(Location.X - e.Location.X);
					ent = e;
				}

			var r = ent != null
				? Math.Atan2(Location.Y - ent.Location.Y, Location.X - ent.Location.X)
				: DevelopUtility.Deg2Rad(GetRand(360));

			float x = -(float) Math.Cos(r) * 5,
				y = -(float) Math.Sin(r) * 5;

			Velocity = new Vector(x, y);
		}
 public EntityTurcosRed(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
     : base(pnt, obj, chips, par)
 {
     MainAi = new AiWalk(this, 1, 6, 7, 9, 10);
 }
示例#28
0
 public EntityStar(PointF p, Object[] mpts, byte[,,] mp, EntityList par)
     : base(p, mpts, mp, par)
 {
     Velocity.X = DX.GetRand(4) - 2;
     Velocity.Y = -DX.GetRand(5) - 5;
     SetGraphic(1);
 }
示例#29
0
 public EntityWaterSplash(PointF p, Object[] mpts, byte[,,] mp, EntityList par)
     : base(p, mpts, mp, par)
 {
     Velocity.X = DX.GetRand(2) - 1;
     Velocity.Y = -4;
     SetGraphic(0);
 }
示例#30
0
 public EntityBubble(PointF p, Object[] mpts, byte[,,] mp, EntityList par)
     : base(p, mpts, mp, par)
 {
     Velocity.Y = -1;
     SetGraphic(2);
 }