From 71e603101369cf4a144904a2fc0e45ad3f862296 Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Sat, 12 Jun 2021 17:31:33 -0400 Subject: Refine enemy locomotion --- Assets/Scripts/Controllers/GameController.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Assets/Scripts/Controllers/GameController.cs') diff --git a/Assets/Scripts/Controllers/GameController.cs b/Assets/Scripts/Controllers/GameController.cs index b9f65f2..646b750 100644 --- a/Assets/Scripts/Controllers/GameController.cs +++ b/Assets/Scripts/Controllers/GameController.cs @@ -43,14 +43,18 @@ namespace Controllers internal int score; private Vector2 lastShotPosition; - public void Score(Vector2 Rim) { + public void Score(Vector2 Rim) + { if (Vector2.Distance(lastShotPosition, Rim) >= 1) { score += 3; Debug.Log("Three point"); - } else + } + else + { score += 2; Debug.Log("Two point"); + } } private State dribble => isEnemy ? State.EnemyDribble : State.PlayerDribble; @@ -76,7 +80,7 @@ namespace Controllers public bool GrabBall(Vector2 handPosition) { // Don't allow the ball to be picked up if someone shot it. Also don't try picking it up if we're already holding it. - if (controller.state.IsShot() || controller.state == dribble) return false; + //if (controller.state.IsShot() || controller.state == dribble) return false; // Make sure its within their grab area. if (Vector2.Distance(controller.ball.transform.position, handPosition) > 0.75f) return false; -- cgit v1.2.3