very good progress, next up: tripping and starting the game

This commit is contained in:
Tabby 2025-05-15 15:28:16 +10:00
parent 8be34b6c12
commit f16d046a6c
14 changed files with 206 additions and 19 deletions

26
itemPopup.gd Normal file
View file

@ -0,0 +1,26 @@
extends PanelContainer
@export var texture_rect : TextureRect
@export var label : RichTextLabel
var active : bool = false
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
GameManager.show_item_signal.connect(showPopup)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
visible = active
if(Input.is_action_just_pressed("advance_prompt")):
hidePopup()
func showPopup(item_name : String, item_texture : Texture):
label.text = item_name
texture_rect.texture = item_texture
active = true
GameManager.change_player_movement(false)
func hidePopup():
active = false
GameManager.change_player_movement(true)