diff options
Diffstat (limited to 'Assets/Scripts/Controllers/GameController.cs')
-rw-r--r-- | Assets/Scripts/Controllers/GameController.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Assets/Scripts/Controllers/GameController.cs b/Assets/Scripts/Controllers/GameController.cs index 7801e17..e27a562 100644 --- a/Assets/Scripts/Controllers/GameController.cs +++ b/Assets/Scripts/Controllers/GameController.cs @@ -135,15 +135,16 @@ namespace Controllers /// Shoot the ball if possible. /// </summary> /// <param name="playerTransform"></param> + /// <param name="time"></param> /// <returns>Whether or not the ball was shot</returns> - public bool Shoot(Transform playerTransform) + public bool Shoot(Transform playerTransform, float time) { if (controller.state != dribble) return false; // We must be dribbling the ball to shoot it. controller.BallAnimation.enabled = true; controller.dribbleSound.Stop(); controller.state = shoot; controller.ball.Rigidbody.bodyType = RigidbodyType2D.Dynamic; - controller.ball.Shoot(hoop.transform.position); + controller.ball.Shoot(hoop.transform.position, time); lastShotPosition = playerTransform.position; return true; } |