Started working on a simple dialog system

This commit is contained in:
2026-03-15 07:11:42 +11:00
parent 84cb13e717
commit 336dd59dbb
6 changed files with 39 additions and 3 deletions

View File

@@ -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: