WIP
This commit is contained in:
17
levels/level_1.gd
Normal file
17
levels/level_1.gd
Normal 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
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
20
levels/level_2.gd
Normal 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
1139
levels/level_2.tscn
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user