aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Assets/Scripts/Controllers/GameController.cs
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-06-12 21:25:59 -0400
committerCameron Katri <me@cameronkatri.com>2021-06-12 21:25:59 -0400
commit08c4ba7f5aa07db27341cbd056d6482376191d2a (patch)
tree583dd59123fac79cf00b4b9d3d334790438d48d4 /Assets/Scripts/Controllers/GameController.cs
parent1e6b5794b3e0be28192529256d6d3f562f32f4ad (diff)
downloadgmtk-gamejam-08c4ba7f5aa07db27341cbd056d6482376191d2a.tar.gz
gmtk-gamejam-08c4ba7f5aa07db27341cbd056d6482376191d2a.tar.zst
gmtk-gamejam-08c4ba7f5aa07db27341cbd056d6482376191d2a.zip
Add non working time shooting
Diffstat (limited to 'Assets/Scripts/Controllers/GameController.cs')
-rw-r--r--Assets/Scripts/Controllers/GameController.cs5
1 files changed, 3 insertions, 2 deletions
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.
/// </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;
}