added verdant hills lore

This commit is contained in:
pennyrigate 2023-04-13 13:27:24 -04:00
parent 463014f22e
commit 4d59717b88
12 changed files with 216 additions and 23 deletions

View file

@ -2,6 +2,7 @@ extends Node2D
export var target_time_any = 0
export var target_time_100 = 0
export (AudioStream) var music
export (Array, PackedScene) var lore_entries = null
#Bonuses
var time_bonus = true
@ -20,7 +21,11 @@ func _physics_process(delta):
if Debug.entry == false && Game.can_pause:
#Pause
if Input.is_action_just_pressed("pause") && !get_tree().paused:
get_parent().add_child(Game.pause_screen.instance())
var pause = Game.pause_screen.instance()
if lore_entries != null && !lore_entries.empty():
var entry = lore_entries[randi() % lore_entries.size()]
pause.lore_entry = entry
get_parent().add_child(pause)
# restart level
if Input.is_action_just_pressed("restart"):
Game.call_deferred("restart_level")