More UI work
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
class_name Adventurer extends CharacterBody2D
|
||||
|
||||
const popup_template = preload("res://profile_popup.tscn")
|
||||
var profile_popup
|
||||
|
||||
@onready var bt_player : BTPlayer = $BTPlayer
|
||||
@onready var movement_speed : float = 400.0
|
||||
@export var movement_speed : float = 400.0
|
||||
@onready var movement_target_position : Vector2 = global_position
|
||||
@onready var nav_agent : NavigationAgent2D = $NavigationAgent2D
|
||||
|
||||
@@ -77,3 +80,13 @@ func show_speech_bubble(bubble_type : String) -> void:
|
||||
|
||||
func _on_nav_agent_finished() -> void:
|
||||
navigation_finished.emit()
|
||||
|
||||
|
||||
func _on_mouse_entered() -> void:
|
||||
profile_popup = popup_template.instantiate()
|
||||
add_child(profile_popup)
|
||||
profile_popup.setup(data.name, data.level, data.job, "Nothing")
|
||||
|
||||
|
||||
func _on_mouse_exited() -> void:
|
||||
profile_popup.queue_free()
|
||||
|
||||
Reference in New Issue
Block a user