jail.gd 432 B

1234567891011121314151617
  1. extends Node3D
  2. # Called when the node enters the scene tree for the first time.
  3. func _ready():
  4. GameManager.remove_objectives()
  5. GameManager.objectives_visible(true)
  6. GameManager.add_objective("escape jail")
  7. $Timer.start()
  8. func _on_timer_timeout():
  9. $Control.visible = true
  10. $Control/VideoStreamPlayer.play()
  11. func _on_video_stream_player_finished():
  12. $Control.visible = false
  13. $scream.play()
  14. GameManager.die("you got touched")