Skip to main content

DialogPortrait

Abstract Class

Inherits: Node

Description

Abstract class for dialog portraits from Sprouty Dialogs plugin.

It provides the basic methods to handle the portrait behavior during a dialog.

info

You should inherit from this class to create your own dialog portraits.

Methods

Return TypeMethod
voidset_portrait() (abstract)
voidon_portrait_enter() (abstract)
voidon_portrait_exit() (abstract)
voidon_portrait_talk() (abstract)
voidon_portrait_stop_talking() (abstract)
voidhighlight_portrait() (abstract)
voidunhighlight_portrait() (abstract)

Method Descriptions

func set_portrait() -> void (abstract)

Called when the portrait is instantiated or changed. Override this method to set up the portrait initially


func on_portrait_enter() -> void (abstract)

Called when the character is added to the scene. Override this method to update the portrait when character enters the scene.


func on_portrait_exit() -> void (abstract)

Called when the character is removed from the scene. Override this method to update the portrait when character exits the scene.


func on_portrait_talk() -> void (abstract)

Called when the typing of the dialog starts. Override this method to update the portrait when the character starts talking.


func on_portrait_stop_talking() -> void (abstract)

Called when the typing of the dialog is finished. Override this method to update the portrait when the character stops talking.


func highlight_portrait() -> void (abstract)

Called when the character is active in the dialog but not currently talking (e.g. waiting for user input, joins without dialog). Override this method to update the portrait when the character is active, but is not talking.


func unhighlight_portrait() -> void (abstract)

Called when the character becomes inactive in the dialog (e.g. when the speaker is changed to another character). Override this method to update the portrait when the character becomes inactive.