subsystem_Portraits

This contains the source code documentation of the class subsystem_Portraits.

subsystem_Portraits

Inherits: DialogicSubsystem

Subsystem that manages portraits and portrait positions.

Properties


Methods

ReturnsMethod
Nodeadd_character ( character: DialogicCharacter, portrait: String, position_idx: int )
voidadd_portrait_position ( position_index: int, position: Vector2 )
DialogicAnimationanimate_character ( character: DialogicCharacter, animation_path: String, length: float, repeats: int = 1 )
voidchange_character_extradata ( character: DialogicCharacter, extra_data: String = "" )
voidchange_character_mirror ( character: DialogicCharacter, mirrored: bool = false, force: bool = false )
voidchange_character_portrait ( character: DialogicCharacter, portrait: String, update_transform: bool = true )
voidchange_character_z_index ( character: DialogicCharacter, z_index: int, update_zindex: bool = true )
voidchange_speaker ( speaker: DialogicCharacter = null, portrait: String = "" )
voidclear_game_state ( clear_flag: int = 0 )
Dictionaryget_character_info ( character: DialogicCharacter )
DialogicCharacter[]get_joined_characters ( )
DialogicNode_PortraitContainerget_portrait_container ( postion_index: int )
boolis_character_joined ( character: DialogicCharacter )
Nodejoin_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 )
voidleave_all_characters ( animation_name: String = "", animation_length: float = 0.0, animation_wait: bool = false )
voidleave_character ( character: DialogicCharacter, animation_name: String = "", animation_length: float = 0.0, animation_wait: bool = false )
voidload_game_state ( load_flag: int = 0 )
voidmove_character ( character: DialogicCharacter, position_idx: int, time: float = 0.0 )
voidmove_portrait_position ( position_index: int, vector: Vector2, relative: bool = false, time: float = 0.0 )
voidpause ( )
voidremove_character ( character: DialogicCharacter )
voidreset_all_portrait_positions ( time: float = 0.0 )
voidreset_portrait_position ( position_index: int, time: float = 0.0 )
voidresume ( )
voidtext_effect_portrait ( text_node: Control, skipped: bool, argument: String )
boolz_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

var default_portrait_scene =

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 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.


func pause ( ) ⇒ void

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.


func resume ( ) ⇒ void

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.