Skip to content

Commit

Permalink
Can no longer interact with the ball while it is in motion
Browse files Browse the repository at this point in the history
  • Loading branch information
Halfwhit authored and Halfwhit committed Mar 19, 2019
1 parent 4225403 commit d2f435f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Scenes/Assets/Player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func _physics_process(delta):
#Update in_motion variable
check_motion()

if Input.is_action_just_pressed("touch_main"):
if in_motion == false and Input.is_action_just_pressed("touch_main"):
get_new_vector()

hit_ball(delta)
Expand Down
4 changes: 2 additions & 2 deletions Scenes/Assets/Player.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ext_resource path="res://Scenes/Assets/Player.gd" type="Script" id=1]
[ext_resource path="res://Resources/ball.png" type="Texture" id=2]

[sub_resource type="CircleShape2D" id=2]
[sub_resource type="CircleShape2D" id=1]
custom_solver_bias = 1.0
radius = 25.0

Expand All @@ -15,5 +15,5 @@ script = ExtResource( 1 )
texture = ExtResource( 2 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
shape = SubResource( 1 )

0 comments on commit d2f435f

Please sign in to comment.