src / dialogue / chapters / 1 / goal / goal.tscn
Diagram
Overridden virtual functions
_ready
func _ready() -> void:
%MonumentDescription.hide()
func _ready() -> void:
if on_fire: fire()
else: wood()
_input
func _input(_event: InputEvent) -> void:
if not started: return
if waiting: return
if _event.is_action_pressed('ui_accept'):
continue_dialogue()
Scene Tree
-
Goal Area2D
-
Dialogue res://src/dialogue/dialogue.tscn
-
Monument Sprite2D
-
DescriptionArea Area2D
-
CollisionShape2D CollisionShape2D
-
MonumentDescription RichTextLabel
-
-
-
EventArea CollisionShape2D
-
AnimationPlayer AnimationPlayer
-
Signal Connections
func _on_area_entered(_area: Area2D) -> void:
if not started: start()
func _on_dialogue_event(event_name: String) -> void:
if %AnimationPlayer.has_animation(event_name):
%AnimationPlayer.play(event_name)
event.emit(event_name)
func _on_dialogue_finished() -> void:
finished.emit()
func _on_description_area_entered(_area: Area2D) -> void:
%MonumentDescription.show()
func _on_description_area_area_exited(_area: Area2D) -> void:
%MonumentDescription.hide()
Animations
01.fire
Animation_ik2yi
Properties
| Name | Value |
|---|---|
collision_layer |
|
collision_mask |
|
script |
| Name | Value |
|---|---|
unique_name_in_owner |
|
visible |
|
boot_file |
| Name | Value |
|---|---|
position |
|
scale |
|
texture |
| Name | Value |
|---|---|
position |
|
scale |
|
collision_layer |
|
collision_mask |
|
| Name | Value |
|---|---|
position |
|
scale |
|
shape |
|
| Name | Value |
|---|---|
unique_name_in_owner |
|
offset_left |
|
offset_top |
|
offset_right |
|
offset_bottom |
|
theme |
|
theme_override_font_sizes/normal_font_size |
|
text |
|
horizontal_alignment |
|
| Name | Value |
|---|---|
unique_name_in_owner |
|
position |
|
on_fire |
|
| Name | Value |
|---|---|
position |
|
| Name | Value |
|---|---|
position |
|
shape |
|
| Name | Value |
|---|---|
unique_name_in_owner |
|
libraries/ |
|
goal.gd
extends Node2D
signal event(event_name: String)
signal finished
@onready var started : bool = false
func _ready() -> void:
%MonumentDescription.hide()
func start() -> void:
started = true
%Dialogue.start()
event.emit('started')
func ligth_firewood() -> void:
%Bonfire.fire()
func _on_description_area_entered(_area: Area2D) -> void:
%MonumentDescription.show()
func _on_description_area_area_exited(_area: Area2D) -> void:
%MonumentDescription.hide()
func _on_area_entered(_area: Area2D) -> void:
if not started: start()
func _on_dialogue_event(event_name: String) -> void:
if %AnimationPlayer.has_animation(event_name):
%AnimationPlayer.play(event_name)
event.emit(event_name)
func _on_dialogue_finished() -> void:
finished.emit()
