コード例 #1
0
 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));
 }
コード例 #2
0
 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);
		}
コード例 #4
0
 public EntityStrangeFlower(PointF pnt, Object[] obj, byte[,,] chips, EntityList par)
 {
     Location = pnt;
     Mpts = obj;
     Map = chips;
     Parent = par;
     Size = new Size(48, 48);
 }
コード例 #5
0
 public EntityArrow(PointF pnt, Object[] obj, byte[,,] chps, EntityList par)
 {
     Mpts = obj;
     Map = chps;
     Parent = par;
     Location = pnt;
     SetGraphic(0);
     Velocity.X = -2;
 }
コード例 #6
0
 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));
 }
コード例 #7
0
 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));
 }
コード例 #8
0
 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();
 }
コード例 #9
0
 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);
 }
コード例 #10
0
 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));
 }
コード例 #11
0
 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));
 }
コード例 #12
0
 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);
 }
コード例 #13
0
        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));
        }
コード例 #14
0
		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;
		}
コード例 #16
0
		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);
		}
コード例 #17
0
		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;
		}
コード例 #19
0
		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);
		}
コード例 #24
0
 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);
		}
コード例 #27
0
 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);
 }