chore: update
This commit is contained in:
parent
818c02eb38
commit
c701f456df
2 changed files with 8 additions and 8 deletions
|
@ -6,7 +6,7 @@ extends Node
|
|||
# Preload the tower scene
|
||||
# TODO 2
|
||||
@export var tower_density = 250 # How often a tower should be added
|
||||
var last_built = 300 # Helper variable to adhear to the given tower density
|
||||
var last_built = 300 # Helper variable to use the given tower density
|
||||
|
||||
# Build a single tower
|
||||
func build_tower():
|
||||
|
|
|
@ -8,10 +8,10 @@ signal hit # The bird is hit/flies off screen
|
|||
var screen_size # The screen size, we want this at a later point
|
||||
|
||||
# Speed variables
|
||||
@export var speed = 3 # How fast the player will move (pixels/sec).
|
||||
@export var jump_speed = 4 # Speed at which the bird gains height after jumping
|
||||
@export var speed_inc = 0.3 # Speed at which the bird falls
|
||||
var speed_y = 0 # Y speed of the bird
|
||||
@export var speed = 3 # How fast the player will move (pixels/sec).
|
||||
@export var jump_speed = 4 # Speed at which the bird gains height after jumping
|
||||
@export var speed_inc = 0.3 # Speed at which the bird falls
|
||||
var speed_y = 0 # Y speed of the bird
|
||||
|
||||
var playing = false # State of the game
|
||||
|
||||
|
@ -21,7 +21,7 @@ func start_game():
|
|||
speed_y = 0
|
||||
update_rotation()
|
||||
|
||||
# Called when the node enters the scene tree for the first time
|
||||
# Called when the node is ready to be displayed
|
||||
func _ready():
|
||||
# We want the screen size to check if something is off screen
|
||||
screen_size = get_viewport_rect().size
|
||||
|
@ -31,7 +31,7 @@ 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
|
||||
# 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.
|
||||
|
||||
|
@ -43,7 +43,7 @@ func _process(_delta):
|
|||
|
||||
# When we're not playing and space is hit then the game starts -> emit the right signal
|
||||
# TODO 2
|
||||
pass
|
||||
pass # remove this pass if you implement the todo's
|
||||
|
||||
# Potential space are handled
|
||||
# Decrease the y speed
|
||||
|
|
Loading…
Reference in a new issue