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
|
# Preload the tower scene
|
||||||
# TODO 2
|
# TODO 2
|
||||||
@export var tower_density = 250 # How often a tower should be added
|
@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
|
# Build a single tower
|
||||||
func build_tower():
|
func build_tower():
|
||||||
|
|
|
@ -21,7 +21,7 @@ func start_game():
|
||||||
speed_y = 0
|
speed_y = 0
|
||||||
update_rotation()
|
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():
|
func _ready():
|
||||||
# We want the screen size to check if something is off screen
|
# We want the screen size to check if something is off screen
|
||||||
screen_size = get_viewport_rect().size
|
screen_size = get_viewport_rect().size
|
||||||
|
@ -31,7 +31,7 @@ func _process(_delta):
|
||||||
# Every frame we want to move the bird
|
# Every frame we want to move the bird
|
||||||
# The player can influence the movement by pressing space
|
# 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
|
# 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.
|
# 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
|
# When we're not playing and space is hit then the game starts -> emit the right signal
|
||||||
# TODO 2
|
# TODO 2
|
||||||
pass
|
pass # remove this pass if you implement the todo's
|
||||||
|
|
||||||
# Potential space are handled
|
# Potential space are handled
|
||||||
# Decrease the y speed
|
# Decrease the y speed
|
||||||
|
|
Loading…
Reference in a new issue