chore: fix

This commit is contained in:
Topvennie 2024-04-18 18:29:03 +02:00
parent bb61699984
commit 986d02963a

View file

@ -30,35 +30,35 @@ func _ready():
func _process(_delta):
# Every frame we want to move the bird
# The player can influence the movement by pressing space
# An Area2D can have a position, split between x speed and y speed in a tuple
# Right now we want to bird to move at a set pace so x is constant
# It's up to you to change the y accordingly.
# Check if space is pressed
if Input.is_action_just_pressed("ui_accept"):
# Player pressed space -> Move the bird up
# Space is pressed, change the y speed so it gains height
# TODO 1
# When we're not playing and space is hit then the game starts -> emit the right signal
# TODO 2
pass # remove this pass if you implement the todo's
# Potential space are handled
# Decrease the y speed
# Decrease the y speed
# TODO 1
# Emit signal when a pipe is passed
# TODO 3
# Update the position with the new x and y speed
position += Vector2(speed, speed_y * speed)
# Rotate the bird
update_rotation()
# Rotate the bird
# Rotate the bird
func update_rotation():
rotation = atan(speed_y / speed)
@ -68,5 +68,4 @@ func update_rotation():
func _on_Player_body_entered(_body):
# Set the right variables and emit the right signals so the game restarts
# TODO 2
pass