PopochiuITransitionLayer
Inherits: Node
Description
Provides access to the PopochiuTransitionLayer via the singleton T
(for example: T.play_transition("fade", 1.0)).
Use this interface to control screen transitions.
Capabilities include:
-
Play transition animations when changing rooms or during cutscenes.
-
Show or hide the curtain manually.
-
Query available transition animations.
Use examples:
# Play a fade transition lasting 1 second
T.play_transition("fade", 1.0)
# Play a wipe left transition lasting 0.5 seconds, both when entering and exiting the screen
T.play_transition("wipe_left", 0.5, T.PLAY_MODE.IN_OUT)
# Show the curtain (without animation)
T.show_curtain()
# Hide the curtain (without animation)
T.hide_curtain()
Properties
| Type | Name | Default |
|---|---|---|
| PopochiuTransitionLayer | tl |
Methods
| Return Type | Method |
|---|---|
| PackedStringArray | get_all_transitions_list() |
| Animation | get_custom_transition(anim_name: String) |
| PackedStringArray | get_custom_transitions_list() |
| PackedStringArray | get_predefined_transitions_list() |
| Animation | get_transition(anim_name: String) |
| bool | has_color_override_track(anim_name: String) |
| bool | has_custom_library() |
| bool | has_custom_transition(anim_name: String) |
| void | hide_curtain() |
| void | play_transition() |
| void | queue_play_transition() |
| void | show_curtain(color: Color = Color(-1, -1, -1, -1)) |
Signals
- transition_finished(transition_name: String)
Constants
| Name | Value |
|---|---|
PLAY_MODE |
PopochiuTransitionLayer.PLAY_MODE |
Signal Descriptions
transition_finished
signal transition_finished(transition_name: String)
Emitted when a transition animation finishes.
Constant Descriptions
PLAY_MODE
const PLAY_MODE = PopochiuTransitionLayer.PLAY_MODE
Re-export PLAY_MODE enum for convenience from PopochiuTransitionLayer.
Property Descriptions
tl
var tl : PopochiuTransitionLayer
Provides access to the PopochiuTransitionLayer instance managed by the engine.
Method Descriptions
get_all_transitions_list
func get_all_transitions_list() -> PackedStringArray
Returns a list of all available transition animation names.
get_custom_transition
func get_custom_transition(anim_name: String) -> Animation
Returns the custom transition animation specified by anim_name, or null
if not found.
get_custom_transitions_list
func get_custom_transitions_list() -> PackedStringArray
Returns a list of custom transition animation names.
get_predefined_transitions_list
func get_predefined_transitions_list() -> PackedStringArray
Returns a list of predefined transition animation names.
get_transition
func get_transition(anim_name: String) -> Animation
Returns the transition animation specified by anim_name.
has_color_override_track
func has_color_override_track(anim_name: String) -> bool
Returns true if the transition anim_name has a track that overrides the
default curtain color.
has_custom_library
func has_custom_library() -> bool
Returns true if the custom animation library exists.
has_custom_transition
func has_custom_transition(anim_name: String) -> bool
Returns true if a custom transition named anim_name exists.
hide_curtain
func hide_curtain() -> void
Hides the transition layer (curtain).
play_transition
func play_transition()
Plays the transition animation identified by anim_name for duration seconds using
the specified mode. If parameters are omitted, project defaults are used.
queue_play_transition
func queue_play_transition()
Plays the transition animation identified by anim_name for duration seconds using
the specified mode. If parameters are omitted, project defaults are used.
This method is intended to be used inside a queue() of instructions.
show_curtain
func show_curtain(color: Color = Color(-1, -1, -1, -1)) -> void
Shows the curtain using color without playing a transition animation.