src / dialogue / chapters / 1 / goal / goal.tscn

Diagram

Diagram

Assets

200

Overridden virtual functions

_ready

func _ready() -> void:
	%MonumentDescription.hide()
$Bonfire
func _ready() -> void:
	if on_fire: fire()
	else: wood()

_input

$Dialogue
func _input(_event: InputEvent) -> void:
	if not started: return
	if waiting: return
	if _event.is_action_pressed('ui_accept'):
		continue_dialogue()

Scene Tree

Signal Connections

$.:[area_entered]⇒$.
func _on_area_entered(_area: Area2D) -> void:
	if not started: start()
$Dialogue:[event]⇒$.
func _on_dialogue_event(event_name: String) -> void:
	if %AnimationPlayer.has_animation(event_name):
		%AnimationPlayer.play(event_name)
	event.emit(event_name)
$Dialogue:[finished]⇒$.
func _on_dialogue_finished() -> void:
	finished.emit()
$Monument/DescriptionArea:[area_entered]⇒$.
func _on_description_area_entered(_area: Area2D) -> void:
	%MonumentDescription.show()
$Monument/DescriptionArea:[area_exited]⇒$.
func _on_description_area_area_exited(_area: Area2D) -> void:
	%MonumentDescription.hide()

Animations

01.fire

Diagram

Animation_ik2yi

Diagram

Properties

Table 1. Root properties
Name Value

collision_layer

0

collision_mask

16

script

Table 2. $Dialogue properties
Name Value

unique_name_in_owner

true

visible

false

boot_file

Table 3. $Monument properties
Name Value

position

Vector2(734, 181)

scale

Vector2(5, 5)

texture

Monument
Figure 1. res://assets/images/stages/chapter1/Monument.png
Table 4. $Monument/DescriptionArea properties
Name Value

position

Vector2(-146.79999, -36.199997)

scale

Vector2(0.19999999, 0.19999999)

collision_layer

0

collision_mask

16

Table 5. $Monument/DescriptionArea/CollisionShape2D properties
Name Value

position

Vector2(721.49994, 145.99997)

scale

Vector2(0.9999998, 0.9999998)

shape

SubResource("RectangleShape2D_pereq")

Table 6. $Monument/DescriptionArea/MonumentDescription properties
Name Value

unique_name_in_owner

true

offset_left

351.99997

offset_top

-190.00003

offset_right

1130.0

offset_bottom

-12.000061

theme

theme_override_font_sizes/normal_font_size

40

text

- - オレダケ山 鎮魂の碑 - - 山中で亡くなられた登山者の 安らかな眠りを願って

horizontal_alignment

1

Table 7. $Bonfire properties
Name Value

unique_name_in_owner

true

position

Vector2(1301, 419.00003)

on_fire

false

Table 8. $Crow properties
Name Value

position

Vector2(2264.9998, -209.99998)

Table 9. $EventArea properties
Name Value

position

Vector2(1477.25, 227.75)

shape

SubResource("RectangleShape2D_mruft")

Table 10. $AnimationPlayer properties
Name Value

unique_name_in_owner

true

libraries/

SubResource("AnimationLibrary_ik2yi")

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()