Merged and updated level2

This commit is contained in:
Nathan Anderson 2022-08-05 17:16:33 -06:00
commit c7d42e09ce
3 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=2] [gd_scene load_steps=2 format=2]
[ext_resource path="res://roger-roger/bush2.png" type="Texture" id=1] [ext_resource path="res://assets/bush2.png" type="Texture" id=1]
[node name="Bush1" type="Node2D"] [node name="Bush1" type="Node2D"]
position = Vector2( -527, 252 ) position = Vector2( -527, 252 )

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=2] [gd_scene load_steps=2 format=2]
[ext_resource path="res://roger-roger/bush1.png" type="Texture" id=1] [ext_resource path="res://assets/bush1.png" type="Texture" id=1]
[node name="Bush2" type="Node2D"] [node name="Bush2" type="Node2D"]

View File

@ -5,7 +5,7 @@ var level_path := "res://scenes/level{num}.tscn"
var level1 = preload("res://scenes/level1.tscn") var level1 = preload("res://scenes/level1.tscn")
var current_level_num = 1 var current_level_num = 1
var current_level : Node var current_level : Node
var max_levels = 3 var max_levels := 3
var level_win := false var level_win := false
onready var end_timer := $EndTimer onready var end_timer := $EndTimer
@ -18,7 +18,10 @@ func _ready() -> void:
func _on_level_complete(is_win: bool) -> void: func _on_level_complete(is_win: bool) -> void:
print('Level complete') print('Level complete')
level_win = is_win level_win = is_win
end_timer.start(2) if current_level_num == max_levels:
end_timer.start(3.5)
else:
end_timer.start(2)
func _on_EndTimer_timeout() -> void: func _on_EndTimer_timeout() -> void: