This contains the source code documentation of the class subsystem_Portraits
.
subsystem_Portraits
Inherits: DialogicSubsystem
Subsystem that manages portraits and portrait positions.
Properties
Name | Type | Default |
---|---|---|
default_portrait_scene | PackedScene |
Methods
Returns | Method |
---|---|
Node | add_character ( character : DialogicCharacter, portrait : String, position_idx : int ) |
void | add_portrait_position ( position_index : int, position : Vector2 ) |
DialogicAnimation | animate_character ( character : DialogicCharacter, animation_path : String, length : float, repeats : int = 1 ) |
void | change_character_extradata ( character : DialogicCharacter, extra_data : String = "" ) |
void | change_character_mirror ( character : DialogicCharacter, mirrored : bool = false , force : bool = false ) |
void | change_character_portrait ( character : DialogicCharacter, portrait : String, update_transform : bool = true ) |
void | change_character_z_index ( character : DialogicCharacter, z_index : int, update_zindex : bool = true ) |
void | change_speaker ( speaker : DialogicCharacter = null , portrait : String = "" ) |
void | clear_game_state ( clear_flag : int = 0 ) |
Dictionary | get_character_info ( character : DialogicCharacter ) |
DialogicCharacter[] | get_joined_characters ( ) |
DialogicNode_PortraitContainer | get_portrait_container ( postion_index : int ) |
String | get_valid_portrait ( character : DialogicCharacter, portrait : String ) |
bool | is_character_joined ( character : DialogicCharacter ) |
Node | join_character ( character : DialogicCharacter, portrait : String, position_idx : int, mirrored : bool = false , z_index : int = 0 , extra_data : String = "" , 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 ) |
void | leave_character ( character : DialogicCharacter, animation_name : String = "" , animation_length : float = 0.0 , animation_wait : bool = false ) |
void | load_game_state ( load_flag : int = 0 ) |
void | move_character ( character : DialogicCharacter, position_idx : int, time : float = 0.0 ) |
void | move_portrait_position ( position_index : int, vector : Vector2, relative : bool = false , time : float = 0.0 ) |
void | pause ( ) |
void | remove_character ( character : DialogicCharacter ) |
void | reset_all_portrait_positions ( time : float = 0.0 ) |
void | reset_portrait_position ( position_index : int, time : float = 0.0 ) |
void | resume ( ) |
void | text_effect_portrait ( text_node : Control, skipped : bool, argument : String ) |
bool | z_sort_portrait_containers ( con1 : DialogicNode_PortraitContainer, con2 : DialogicNode_PortraitContainer ) |
Signals
signal character_joined ( info
: Dictionary )
No description available.
signal character_left ( info
: Dictionary )
No description available.
signal character_moved ( info
: Dictionary )
No description available.
signal character_portrait_changed ( info
: Dictionary )
No description available.
signal position_changed ( info
: Dictionary )
No description available.
Property Descriptions
The default portrait scene.
Method Descriptions
func add_character ( character
: DialogicCharacter, portrait
: String, position_idx
: int ) ⇒ Node
No description available.
func add_portrait_position ( position_index
: int, position
: Vector2 ) ⇒ void
Creates a new portrait container node. It will copy it's size and most settings from the first p_container in the tree. It will be added as a sibling of the first p_container in the tree.
func animate_character ( character
: DialogicCharacter, animation_path
: String, length
: float, repeats
: int = 1
) ⇒ DialogicAnimation
Starts the given animation on the given 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 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_portrait ( character
: DialogicCharacter, portrait
: String, update_transform
: bool = true
) ⇒ void
Changes the portrait of a 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_speaker ( speaker
: DialogicCharacter = null
, portrait
: String = ""
) ⇒ void
Updates all portrait containers set to SPEAKER.
func clear_game_state ( clear_flag
: int = 0
) ⇒ void
No description available.
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_index] Only joined is included (and false) for not joined characters
func get_joined_characters ( ) ⇒ DialogicCharacter[]
Returns a list of the joined charcters (as resources)
func get_portrait_container ( postion_index
: int ) ⇒ DialogicNode_PortraitContainer
No description available.
func get_valid_portrait ( character
: DialogicCharacter, portrait
: String ) ⇒ String
Checks multiple cases to return a valid portrait to use.
func is_character_joined ( character
: DialogicCharacter ) ⇒ bool
Returns true if the given character is currently joined.
func join_character ( character
: DialogicCharacter, portrait
: String, position_idx
: int, 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 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 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 load_game_state ( load_flag
: int = 0
) ⇒ void
No description available.
func move_character ( character
: DialogicCharacter, position_idx
: int, time
: float = 0.0
) ⇒ void
Moves the given character to the given position. Only works with joined characters
func move_portrait_position ( position_index
: int, vector
: Vector2, relative
: bool = false
, time
: float = 0.0
) ⇒ void
No description available.
No description available.
func remove_character ( character
: DialogicCharacter ) ⇒ void
Removes the given characters portrait. Only works with joined characters
func reset_all_portrait_positions ( time
: float = 0.0
) ⇒ void
No description available.
func reset_portrait_position ( position_index
: int, time
: float = 0.0
) ⇒ void
No description available.
No description available.
func text_effect_portrait ( text_node
: Control, skipped
: bool, argument
: String ) ⇒ void
Called from the [portrait=something] text effect.
func z_sort_portrait_containers ( con1
: DialogicNode_PortraitContainer, con2
: DialogicNode_PortraitContainer ) ⇒ bool
No description available.