src / curtain / closing / closing.tscn
Diagram
Instantiators
Scene Tree
-
ClosingCurtain Control
-
Pattern1 Node2D
-
LeftCurtain Polygon2D
-
RightCurtain Polygon2D
-
-
Pattern2 ColorRect
-
Pattern3 ColorRect
-
AnimationPlayer AnimationPlayer
-
Signal Connections
func _on_animation_player_animation_finished(_anim_name: StringName) -> void:
if next_scene: SceneHelper.transit(self, next_scene)
Animations
Animation_bwqwf
pattern1
pattern2
pattern3
Properties
| Name | Value |
|---|---|
z_index |
|
z_as_relative |
|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
script |
| Name | Value |
|---|---|
visible |
|
| Name | Value |
|---|---|
color |
|
polygon |
|
uv |
|
| Name | Value |
|---|---|
color |
|
polygon |
|
uv |
|
| Name | Value |
|---|---|
visible |
|
material |
|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
offset_top |
|
offset_bottom |
|
grow_horizontal |
|
grow_vertical |
|
| Name | Value |
|---|---|
visible |
|
material |
|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
| Name | Value |
|---|---|
unique_name_in_owner |
|
libraries |
|
closing.gd
extends Control
enum Pattern { PATTERN_1, PATTERN_2, PATTERN_3 }
@export var pattern : Pattern
@export_file('*.tscn') var next_scene : String
func play(_next_scene: String) -> void:
next_scene = _next_scene
var number = Pattern.keys()[pattern].split('_')[1]
%AnimationPlayer.play("pattern%s" % number)
func _on_animation_player_animation_finished(_anim_name: StringName) -> void:
if next_scene: SceneHelper.transit(self, next_scene)