This commit is contained in:
Debugman committed 2026-10-17 21:03:13 -05:00
1 parent e39b9eaeb7
commit 96a3dd44e3
11 files changed
+112 -13

No files matched your search

+4 -3
View File
@@ -7,6 +7,7 @@ const FRICTION = 100
const GRAVITY_MULT = 0.8
const JUMP_VELOCITY = -410.0
const DASH_LENGTH = 0.2
const BACKGROUND_COLOR = Color.SANDY_BROWN
var fall_timer = 0.0
var teleport_cooldown = 0
@@ -42,13 +43,13 @@ func on_teleport():
await get_tree().create_timer(1).timeout
teleport_cooldown = 0
func spawn_ghost(position):
func spawn_ghost(ghost_position):
var ghost = preload("res://ghost.tscn")
ghost = ghost.instantiate()
get_parent().add_child(ghost)
print(ghost)
print(ghost.position)
ghost.position = position
ghost.position = ghost_position
func on_death(instant = false, player_position = position):
if !instant:
@@ -127,7 +128,7 @@ func _process(delta: float) -> void:
velocity.x = move_toward(velocity.x, 0, FRICTION)
$Sprite2D.play("idle")
$Sprite2D/HatSprite.play("idle")
$Parallax2D/Sprite2D.modulate = Color.CORAL
$Parallax2D/Sprite2D.modulate = BACKGROUND_COLOR
for hidden_object in get_tree().get_nodes_in_group("Hidden"):
hidden_object.hide()