This commit is contained in:
2024-05-17 12:48:20 +08:00
parent 3afb13063e
commit b9430b518a
9260 changed files with 266058 additions and 0 deletions

17
levels/level_1.gd Normal file
View File

@@ -0,0 +1,17 @@
extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready():
Core.current_level = 1
$Player.spawn($SpawnPoint)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
$UI/StarCount.text = str($Player.stars)
pass
func _input(event):
if event is InputEventKey:
var keycode = int(event.as_text())
if keycode > 0 and keycode < 10:
Core.change_level(keycode)

1679
levels/level_1.tscn Normal file

File diff suppressed because one or more lines are too long

20
levels/level_2.gd Normal file
View File

@@ -0,0 +1,20 @@
extends Node2D
const MAX_Y = 630
# Called when the node enters the scene tree for the first time.
func _ready():
Core.current_level = 2
$Player.spawn($SpawnPoint)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
$UI/StarCount.text = str($Player.stars)
if $Player.position.y > MAX_Y:
$Player.spawn($SpawnPoint)
func _input(event):
if event is InputEventKey:
var keycode = int(event.as_text())
if keycode > 0 and keycode < 10:
Core.change_level(keycode)

1139
levels/level_2.tscn Normal file

File diff suppressed because one or more lines are too long