diff options
author | Carson Katri <carson.katri@gmail.com> | 2021-06-12 17:31:33 -0400 |
---|---|---|
committer | Carson Katri <carson.katri@gmail.com> | 2021-06-12 17:31:33 -0400 |
commit | 71e603101369cf4a144904a2fc0e45ad3f862296 (patch) | |
tree | fd0903a6de2a25025287d9938b4b03d15a4e5b02 /Assets/Scripts/Controllers/GameController.cs | |
parent | 1cb76b1aa4ef16a91c3847fd5f55aedaa5e83d82 (diff) | |
download | gmtk-gamejam-71e603101369cf4a144904a2fc0e45ad3f862296.tar.gz gmtk-gamejam-71e603101369cf4a144904a2fc0e45ad3f862296.tar.zst gmtk-gamejam-71e603101369cf4a144904a2fc0e45ad3f862296.zip |
Refine enemy locomotion
Diffstat (limited to 'Assets/Scripts/Controllers/GameController.cs')
-rw-r--r-- | Assets/Scripts/Controllers/GameController.cs | 10 |
1 files changed, 7 insertions, 3 deletions
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; |