src / dialogue / chapters / 0 / stage0.tscn

Diagram

Diagram

Assets

200
200
200
200

Overridden virtual functions

_ready

func _ready() -> void:
	if not owner: start()
$Dialogue
func _ready() -> void:
	controller.boot_file = boot_file
	controller.channel.connect(_handle)

_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

$Dialogue:[event]⇒$.
func _on_dialogue_event(event_name: String) -> void:
	var key = "event_%s" % event_name
	if %AnimationPlayer.has_animation(key):
		%AnimationPlayer.play(key)
	event.emit(event_name)
$Dialogue:[finished]⇒$.
func _on_dialogue_finished() -> void:
	%AnimationPlayer.play('finished')
$EventArea2D:[area_entered]⇒$.
func _on_event_area_2d_area_entered(_area: Area2D) -> void:
	start()

Animations

Animation_oyqfx

Diagram

event_02.pass_by

Diagram

event_03.laughing

Diagram

event_04.zoom_in

Diagram

event_05.zoom_out

Diagram

finished

Diagram

Properties

Table 1. Root properties
Name Value

script

Table 2. $Dialogue properties
Name Value

unique_name_in_owner

true

visible

false

boot_file

speakers

Array("[SubResource("Resource_ffs01"), SubResource("Resource_gkg18")]")

Table 3. $House properties
Name Value

position

Vector2(881, 473)

scale

Vector2(10, 10)

texture

House
Figure 1. res://assets/images/stages/chapter0/House.png
Table 4. $OldWoman properties
Name Value

position

Vector2(968, 672)

Table 5. $OldWoman/LaughingParticles2D properties
Name Value

unique_name_in_owner

true

visible

false

position

Vector2(16.88889, -19.555555)

amount

2

texture

HA
Figure 2. res://assets/images/particles/HA.png

preprocess

5.08

gravity

Vector2(400, -150)

tangential_accel_min

-100.0

tangential_accel_max

100.0

scale_amount_min

2.5

scale_amount_max

2.6

Table 6. $EventArea2D properties
Name Value

collision_layer

16

collision_mask

16

Table 7. $EventArea2D/CollisionShape2D properties
Name Value

position

Vector2(486, 138)

shape

SubResource("RectangleShape2D_6qvxh")

Table 8. $Camera2D properties
Name Value

unique_name_in_owner

true

position

Vector2(960, 540)

ignore_rotation

false

enabled

false

Table 9. $AnimationPlayer properties
Name Value

unique_name_in_owner

true

libraries

{ &"": SubResource("AnimationLibrary_7eiyn") }

stage_0.gd

extends Node2D

signal event(event_name: String)

var started : bool = false


func _ready() -> void:
	if not owner: start()


func start() -> void:
	if started: return
	started = true
	%Camera2D.enabled = true
	%Camera2D.make_current()
	%Dialogue.start()


func _on_event_area_2d_area_entered(_area: Area2D) -> void:
	start()


func _on_dialogue_event(event_name: String) -> void:
	var key = "event_%s" % event_name
	if %AnimationPlayer.has_animation(key):
		%AnimationPlayer.play(key)
	event.emit(event_name)


func _on_dialogue_finished() -> void:
	%AnimationPlayer.play('finished')