internal void SetGod() { var e = new PlayerGodEventArgs(600, true); PreGod?.Invoke(this, e); if (!e.IsCanceled) { AteGodItem = true; GodTime = e.Time; DESound.Play(Sounds.PowerUp); Core.I.BgmPlay("bgm_god.mid"); } }
/// <summary> /// この EntityPlayer を殺害します。 /// </summary> public override void Kill() { if (IsDying) { return; } if (IsFall) { base.Kill(); // イベントで抑制されている可能性があるので確認する if (IsDying) { Velocity = Vector.Zero; Life = 0; DESound.Play(Sounds.PlayerMiss); } return; } if (Core.I.Time == 0) { base.Kill(); if (IsDying) { SetGraphic(5); } return; } if (GodTime > 0) { return; } var e = new PreEventArgs(); PreDamage?.Invoke(this, e); if (!e.IsCanceled) { DESound.Play(Sounds.PowerDown); var e2 = new PlayerGodEventArgs(240, false); PreGod?.Invoke(this, e2); if (!e2.IsCanceled) { GodTime = e2.Time; } Life--; if (Form != PlayerForm.Big) { Form = PlayerForm.Big; } Velocity = Vector.Zero; } if (Life < 1) { SetGraphic(5); base.Kill(); } }