From 08c4ba7f5aa07db27341cbd056d6482376191d2a Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Sat, 12 Jun 2021 21:25:59 -0400 Subject: Add non working time shooting --- Assets/Scripts/Controllers/GameController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Assets/Scripts/Controllers/GameController.cs') diff --git a/Assets/Scripts/Controllers/GameController.cs b/Assets/Scripts/Controllers/GameController.cs index 3260fb2..775875a 100644 --- a/Assets/Scripts/Controllers/GameController.cs +++ b/Assets/Scripts/Controllers/GameController.cs @@ -125,15 +125,16 @@ namespace Controllers /// Shoot the ball if possible. /// /// + /// /// Whether or not the ball was shot - 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; } -- cgit v1.2.3