1 parent
f33b604253
commit
a5ce3103f4
30 files changed
+1832
-17
No files matched your search
+13
-5
@@ -44,12 +44,18 @@ func on_teleport():
|
||||
$Camera2D.position_smoothing_enabled = true
|
||||
await get_tree().create_timer(1).timeout
|
||||
teleport_cooldown = 0
|
||||
|
||||
func on_death(instant = false):
|
||||
#$BackgroundMusic
|
||||
func spawn_ghost(position):
|
||||
var ghost = preload("res://ghost.tscn")
|
||||
ghost = ghost.instantiate()
|
||||
get_parent().add_child(ghost)
|
||||
print(ghost)
|
||||
print(ghost.position)
|
||||
ghost.position = position
|
||||
|
||||
func on_death(instant = false, player_position = position):
|
||||
if !instant:
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
get_tree().paused = true
|
||||
$Jetpack/DeathSound.play()
|
||||
$Sprite2D.hide()
|
||||
await get_tree().create_timer(0.2).timeout
|
||||
$Sprite2D.show()
|
||||
@@ -58,8 +64,10 @@ func on_death(instant = false):
|
||||
await get_tree().create_timer(0.2).timeout
|
||||
$Sprite2D.show()
|
||||
await get_tree().create_timer(0.2).timeout
|
||||
|
||||
|
||||
spawn_ghost(player_position)
|
||||
get_tree().paused = false
|
||||
|
||||
position = %LevelStart.position
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
Reference in new issue
Block a user