diff options
author | Carson Katri <carson.katri@gmail.com> | 2021-06-12 21:26:35 -0400 |
---|---|---|
committer | Carson Katri <carson.katri@gmail.com> | 2021-06-12 21:26:35 -0400 |
commit | 55c85ac8246c6f811bf1dac0de48da423f064c87 (patch) | |
tree | aedb7f5fd8d7353c9a3e152b10a62d7228c48440 /Assets/Scripts/Controllers/GameController.cs | |
parent | 7a86f34935f52bd86488f878d98877cd645e9900 (diff) | |
parent | fc19cb9c30967431f959a1c9360f5ef847bcd31c (diff) | |
download | gmtk-gamejam-55c85ac8246c6f811bf1dac0de48da423f064c87.tar.gz gmtk-gamejam-55c85ac8246c6f811bf1dac0de48da423f064c87.tar.zst gmtk-gamejam-55c85ac8246c6f811bf1dac0de48da423f064c87.zip |
Merge branch 'master' of git.cameronkatri.com:gmtk-gamejam
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 a3783bd..ce6ea7e 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; } |