This contains the source code documentation of the class subsystem_Portraits
.
subsystem_Portraits
Inherits: DialogicSubsystem
Emitted when a portrait starts animating.
Properties
Name | Type | Default |
---|---|---|
default_portrait_scene | PackedScene | load(...) |
Methods
Returns | Method |
---|---|
void | clear_game_state ( _clear_flag : int = 0 ) |
void | load_game_state ( _load_flag : int = 0 ) |
void | pause ( ) |
void | resume ( ) |
DialogicPortrait | get_character_portrait ( character : DialogicCharacter ) |
bool | z_sort_portrait_containers ( con1 : DialogicNode_PortraitContainer, con2 : DialogicNode_PortraitContainer ) |
String | get_valid_portrait ( character : DialogicCharacter, portrait : String ) |
Node | join_character ( character : DialogicCharacter, portrait : String, position_id : String, mirrored : bool = false , z_index : int = 0 , extra_data : String = "" , animation_name : String = "" , animation_length : float = 0.0 , animation_wait : bool = false ) |
Node | add_character ( character : DialogicCharacter, container : DialogicNode_PortraitContainer, portrait : String, position_id : String ) |
void | change_character_portrait ( character : DialogicCharacter, portrait : String, fade_animation : String = "DEFAULT" , fade_length : float = -1.0 ) |
void | change_character_mirror ( character : DialogicCharacter, mirrored : bool = false , force : bool = false ) |
void | change_character_z_index ( character : DialogicCharacter, z_index : int, update_zindex : bool = true ) |
void | change_character_extradata ( character : DialogicCharacter, extra_data : String = "" ) |
DialogicAnimation | animate_character ( character : DialogicCharacter, animation_path : String, length : float, repeats : int = 1 , is_reversed : bool = false ) |
void | move_character ( character : DialogicCharacter, position_id : String, time : float = 0.0 , easing : int = 2 , trans : int = 1 ) |
void | leave_character ( character : DialogicCharacter, animation_name : String = "" , animation_length : float = 0.0 , animation_wait : bool = false ) |
void | leave_all_characters ( animation_name : String = "" , animation_length : float = 0.0 , animation_wait : bool = false ) |
Node | get_character_node ( character : DialogicCharacter ) |
void | remove_character ( character : DialogicCharacter ) |
DialogicCharacter | get_current_character ( ) |
bool | is_character_joined ( character : DialogicCharacter ) |
DialogicCharacter[] | get_joined_characters ( ) |
Dictionary | get_character_info ( character : DialogicCharacter ) |
void | change_speaker ( speaker : DialogicCharacter = null , portrait : String = "" ) |
void | text_effect_portrait ( _text_node : Control, _skipped : bool, argument : String ) |
Signals
signal character_joined ( info
: Dictionary )
No description available.
signal character_left ( info
: Dictionary )
No description available.
signal character_portrait_changed ( info
: Dictionary )
No description available.
signal character_moved ( info
: Dictionary )
No description available.
Property Descriptions
var default_portrait_scene = load(...)
The default portrait scene.
Method Descriptions
func clear_game_state ( _clear_flag
: int = 0
) ⇒ void
No description available.
func load_game_state ( _load_flag
: int = 0
) ⇒ void
No description available.
No description available.
No description available.
func get_character_portrait ( character
: DialogicCharacter ) ⇒ DialogicPortrait
Checks if [para, character] has joined the scene, if so, returns its active node. The difference between an active and inactive nodes is whether the node is the latest node. If a portrait is fading/animating from portrait A and B, both will exist in the scene, but only the new portrait is active, even if it is not fully visible yet.
func z_sort_portrait_containers ( con1
: DialogicNode_PortraitContainer, con2
: DialogicNode_PortraitContainer ) ⇒ bool
No description available.
func get_valid_portrait ( character
: DialogicCharacter, portrait
: String ) ⇒ String
Checks multiple cases to return a valid portrait to use.
func join_character ( character
: DialogicCharacter, portrait
: String, position_id
: String, mirrored
: bool = false
, z_index
: int = 0
, extra_data
: String = ""
, animation_name
: String = ""
, animation_length
: float = 0.0
, animation_wait
: bool = false
) ⇒ Node
Adds a character at a position and sets it's portrait. If the character is already joined it will only update, portrait, position, etc.
func add_character ( character
: DialogicCharacter, container
: DialogicNode_PortraitContainer, portrait
: String, position_id
: String ) ⇒ Node
No description available.
func change_character_portrait ( character
: DialogicCharacter, portrait
: String, fade_animation
: String = "DEFAULT"
, fade_length
: float = -1.0
) ⇒ void
Changes the portrait of a character. Only works with joined characters.
func change_character_mirror ( character
: DialogicCharacter, mirrored
: bool = false
, force
: bool = false
) ⇒ void
Changes the mirror of the given character. Only works with joined characters
func change_character_z_index ( character
: DialogicCharacter, z_index
: int, update_zindex
: bool = true
) ⇒ void
Changes the z_index of a character. Only works with joined characters
func change_character_extradata ( character
: DialogicCharacter, extra_data
: String = ""
) ⇒ void
Changes the extra data on the given character. Only works with joined characters
func animate_character ( character
: DialogicCharacter, animation_path
: String, length
: float, repeats
: int = 1
, is_reversed
: bool = false
) ⇒ DialogicAnimation
Starts the given animation on the given character. Only works with joined characters
func move_character ( character
: DialogicCharacter, position_id
: String, time
: float = 0.0
, easing
: int = 2
, trans
: int = 1
) ⇒ void
Moves the given character to the given position. Only works with joined characters
func leave_character ( character
: DialogicCharacter, animation_name
: String = ""
, animation_length
: float = 0.0
, animation_wait
: bool = false
) ⇒ void
Removes a character with a given animation or the default animation.
func leave_all_characters ( animation_name
: String = ""
, animation_length
: float = 0.0
, animation_wait
: bool = false
) ⇒ void
Removes all joined characters with a given animation or the default animation.
func get_character_node ( character
: DialogicCharacter ) ⇒ Node
Finds the character node for a character
. Return null
if the character
is not part of the scene.
func remove_character ( character
: DialogicCharacter ) ⇒ void
Removes the given characters portrait. Only works with joined characters.
func get_current_character ( ) ⇒ DialogicCharacter
No description available.
func is_character_joined ( character
: DialogicCharacter ) ⇒ bool
Returns true if the given character is currently joined.
func get_joined_characters ( ) ⇒ DialogicCharacter[]
Returns a list of the joined charcters (as resources)
func get_character_info ( character
: DialogicCharacter ) ⇒ Dictionary
Returns a dictionary with info on a given character. Keys can be [joined, character, node (for the portrait node), position_id] Only joined is included (and false) for not joined characters
func change_speaker ( speaker
: DialogicCharacter = null
, portrait
: String = ""
) ⇒ void
Updates all portrait containers set to SPEAKER.
func text_effect_portrait ( _text_node
: Control, _skipped
: bool, argument
: String ) ⇒ void
Called from the [portrait=something] text effect.