/// <summary>
 /// Checks if it's time for attack and attacks the given entity.
 /// </summary>
 /// <param name="entity">Entity to attack.</param>
 private void Attack(IHasHp entity)
 {
     if (NextAttack == NO_ATTACK)
     {
         entity.TakeHit(Damage);
         NextAttack            = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond + (long)(1000 / AttackSpeed);
         shooting              = true;
         stopShootingAnimation = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond + 250;
         Shot = new Point[]
         {
             Position.ToPoint() + ShootingPoint,
                                  entity.Position.ToPoint() + entity.Center
         };
     }
     else
     {
         long now = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
         if (now >= NextAttack)
         {
             entity.TakeHit(Damage);
             NextAttack            = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond + (long)(1000 / AttackSpeed);
             shooting              = true;
             stopShootingAnimation = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond + 250;
             Shot = new Point[]
             {
                 Position.ToPoint() + ShootingPoint,
                                      entity.Position.ToPoint() + entity.Center
             };
         }
     }
 }
 /// <summary>
 /// Checks if it's time for attack and attacks the given entity.
 /// </summary>
 /// <param name="entity">Entity to attack.</param>
 private void Attack(IHasHp entity)
 {
     if (NextAttack == NO_ATTACK)
     {
         entity.TakeHit(Damage);
         NextAttack = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond + (long)(1000 / AttackSpeed);
     }
     else
     {
         long now = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
         if (now >= NextAttack)
         {
             entity.TakeHit(Damage);
             NextAttack = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond + (long)(1000 / AttackSpeed);
         }
     }
 }