aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Assets/Scripts/Controllers/Ball.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Controllers/Ball.cs')
-rw-r--r--Assets/Scripts/Controllers/Ball.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Assets/Scripts/Controllers/Ball.cs b/Assets/Scripts/Controllers/Ball.cs
index 07e1b37..936b857 100644
--- a/Assets/Scripts/Controllers/Ball.cs
+++ b/Assets/Scripts/Controllers/Ball.cs
@@ -20,11 +20,11 @@ namespace Controllers
controller.BallDropped();
}
- public void Shoot(Vector3 target)
+ public void Shoot(Vector3 target, float time)
{
transform.right = target - transform.position;
Rigidbody.velocity = Vector2.zero;
- Rigidbody.AddForce((transform.right + (transform.up * 0.5f)) * shotForce);
+ Rigidbody.AddForce((transform.right + (transform.up * 0.5f)) * (shotForce * ((Mathf.Clamp(time, 0f, 1f) + 1))));
}
}
}