Started working on a simple dialog system
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
class_name ArrowGirl extends Area2D
|
||||
|
||||
@onready var _sprite = $AnimatedSprite2D
|
||||
var dialog_text = preload("res://DialogDebug_1.tres")
|
||||
var dialog_counter: int = 0
|
||||
|
||||
#boilerplate
|
||||
func _ready():
|
||||
@@ -15,7 +17,8 @@ func _on_animation_finished() -> void:
|
||||
|
||||
func _on_body_entered(body) -> void:
|
||||
if body is BoxBoy:
|
||||
%DialogController.set_dialog("Hello flowers!", 0.2)
|
||||
%DialogController.set_dialog(dialog_text.get_line_raw(dialog_counter), 0.2)
|
||||
dialog_counter += 1
|
||||
|
||||
func _on_body_exited(body) -> void:
|
||||
if body is BoxBoy:
|
||||
|
||||
Reference in New Issue
Block a user