void hitGesture_RectHit(object sender, RectHitEventArgs e) { if (DateTime.Now.Subtract(lastAction) > TimeSpan.FromSeconds(1)) { HitBall(e.RectIdx, e.HitVelocity); lastAction = DateTime.Now; } }
void hitGesture_RectHit(object sender, RectHitEventArgs e) { HitBall(e.RectIdx, e.HitVelocity, sender == _playerOneHitGesture); }