24 lines
878 B
GDScript
24 lines
878 B
GDScript
extends AbstractScreen
|
|
|
|
# Ready : set the colors of caption according to the used in MapViewer
|
|
func _ready():
|
|
$Captions/Entrance.color = $MapViewer.entrance_color
|
|
$Captions/Exit.color = $MapViewer.exit_color
|
|
$Captions/Path.color = $MapViewer.ground_visited
|
|
$Captions/Player.color = $MapViewer.player_color
|
|
$Captions/Chest.color = $MapViewer.chest_color
|
|
|
|
# Initialization
|
|
func init(lvl: Maze, pl: MazePlayer):
|
|
$MapViewer.init(lvl, pl)
|
|
|
|
func _process(_delta):
|
|
if Input.is_action_just_pressed("ui_accept"):
|
|
emit_signal("next_screen", "exploration")
|
|
if Input.is_action_just_pressed("ui_cancel"):
|
|
emit_signal("next_screen", "exploration")
|
|
if Input.is_action_just_pressed("ui_menu"):
|
|
emit_signal("next_screen", "exploration")
|
|
if Input.is_action_just_pressed("ui_info"):
|
|
emit_signal("next_screen", "exploration")
|