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));
 }
Example #2
0
		public override void OnUpdate(Status ks)
		{
			if (!Nikaime)
			{
				EventRuntime.AddScript(GetItemDescription(@"ソウルチョコレート\n命の すべてが 詰まった フシギな チョコレート。", "プレイヤーの 体力が 1だけ 回復する。"));
				Nikaime = true;
			}
			if (Velocity.Y < 0)
				Velocity.Y += 0.1f;
			else if (MainAi == null)
				MainAi = new AiFlySine(this, 0, 5, 5, 5, 5);
			foreach (var entity in Parent.FindEntitiesByType<EntityPlayer>())
			{
				var ep = (EntityPlayer) entity;
				if (!ep.IsDying && new RectangleF(ep.Location, ep.Size).CheckCollision(new RectangleF(Location, Size)))
				{
					ep.Life++;
					SoundUtility.PlaySound(Sounds.LifeUp);
					IsDead = true;
				}
			}
			base.OnUpdate(ks);
		}