コード例 #1
0
 public void Attack()
 {
     SetLookDirectionToPlayer();
     AttackTimer.Restart();
     if (Game.Player.IsBlocking && Game.Player.LookDirection != LookDirection)
     {
         return;
     }
     Game.Player.GetDamage(Damage);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void Attack()
 {
     SetLookDirectionToPlayer();
     AttackTimer.Restart();
     SpawnSkeleton();
 }