public void damage(Charactor.Shot shot) { if (shot.shotType == this.wordtype) { hp = 0; } else { hp--; } if (hp < 4) { Texture = asd.Engine.Graphics.CreateTexture2D("Resource/game_enemy/enemy_" + wordtype + ".png"); } if (hp <= 0) { this.Dispose(); } }
public bool IsHit(Charactor.Shot shot) { return((shot.Position - Position).Length < 16); }