public void Attack() { SetLookDirectionToPlayer(); AttackTimer.Restart(); if (Game.Player.IsBlocking && Game.Player.LookDirection != LookDirection) { return; } Game.Player.GetDamage(Damage); }
public void Attack() { AttackTimer.Restart(); var enemy = Game.Enemies.FirstOrDefault(x => x.Location == Location + (Size)(LookDirection == Look.Right ? new Point(1, 0) : new Point(-1, 0))); enemy?.GetDamage(Damage); }
public void Attack() { SetLookDirectionToPlayer(); AttackTimer.Restart(); SpawnSkeleton(); }