src / curtain / opening / opening.tscn
Diagram
Instantiators
Scene Tree
-
OpeningCurtain Control
-
Pattern1 Node2D
-
LeftCurtain Polygon2D
-
RightCurtain Polygon2D
-
-
Pattern2 ColorRect
-
Pattern3 ColorRect
-
Pattern4 ColorRect
-
AnimationPlayer AnimationPlayer
-
Signal Connections
func _on_animation_player_animation_finished(_anim_name: StringName) -> void:
animation_finished.emit()
Animations
Animation_bwqwf
pattern1
pattern2
pattern3
pattern4
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 |
|---|---|
unique_name_in_owner |
|
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 |
|---|---|
visible |
|
material |
|
layout_mode |
|
anchors_preset |
|
anchor_right |
|
anchor_bottom |
|
grow_horizontal |
|
grow_vertical |
|
| Name | Value |
|---|---|
unique_name_in_owner |
|
libraries |
|
opening.gd
extends Control
signal animation_finished
enum Pattern { PATTERN_1, PATTERN_2, PATTERN_3, PATTERN_4 }
@export var pattern : Pattern
@export var center := Vector2(0.5, 0.5) : set = set_center
func set_center(val: Vector2) -> void:
center = val
%Pattern2.material.set_shader_parameter("center", val)
func play() -> void:
var number = Pattern.keys()[pattern].split('_')[1]
%AnimationPlayer.play("pattern%s" % number)
func _on_animation_player_animation_finished(_anim_name: StringName) -> void:
animation_finished.emit()