v3.6.1 Documentation
Fungus.PortraitController Class Reference

Controls the Portrait sprites on stage More...

Inheritance diagram for Fungus.PortraitController:
Fungus.Stage

Public Member Functions

virtual void RunPortraitCommand (PortraitOptions options, Action onComplete)
 Using all portrait options available, run any portrait command. More...
 
virtual void MoveToFront (Character character)
 Moves Character in front of other characters on stage More...
 
virtual void MoveToFront (PortraitOptions options)
 Moves Character in front of other characters on stage More...
 
virtual void Show (Character character, string position)
 Shows character at a named position in the stage More...
 
virtual void Show (Character character, string portrait, string fromPosition, string toPosition)
 Shows character moving from a position to a position More...
 
virtual void Show (Table optionsTable)
 From lua, you can pass an options table with named arguments example: stage.show{character=jill, portrait="happy", fromPosition="right", toPosition="left"} Any option available in the PortraitOptions is available from Lua More...
 
virtual void Show (PortraitOptions options)
 Show portrait with the supplied portrait options More...
 
virtual void ShowPortrait (Character character, string portrait)
 Simple show command that shows the character with an available named portrait More...
 
virtual void Hide (Character character)
 Simple character hide command More...
 
virtual void Hide (Character character, string toPosition)
 Move the character to a position then hide it More...
 
virtual void Hide (Table optionsTable)
 From lua, you can pass an options table with named arguments example: stage.hide{character=jill, toPosition="left"} Any option available in the PortraitOptions is available from Lua More...
 
virtual void Hide (PortraitOptions options)
 Hide portrait with provided options More...
 
virtual void SetDimmed (Character character, bool dimmedState)
 Sets the dimmed state of a character on the stage. More...
 

Static Public Member Functions

static void SetRectTransform (RectTransform oldRectTransform, RectTransform newRectTransform)
 Performs a deep copy of all values from one RectTransform to another. More...
 

Protected Member Functions

virtual void Awake ()
 
virtual void FinishCommand (PortraitOptions options)
 
virtual PortraitOptions CleanPortraitOptions (PortraitOptions options)
 Makes sure all options are set correctly so it won't break whatever command it's sent to More...
 
virtual void CreatePortraitObject (Character character, float fadeDuration)
 Creates and sets the portrait image for a character More...
 
virtual IEnumerator WaitUntilFinished (float duration, Action onComplete=null)
 
virtual void SetupPortrait (PortraitOptions options)
 
virtual void DoMoveTween (Character character, RectTransform fromPosition, RectTransform toPosition, float moveDuration, Boolean waitUntilFinished)
 
virtual void DoMoveTween (PortraitOptions options)
 

Protected Attributes

float waitTimer
 
Stage stage
 

Detailed Description

Controls the Portrait sprites on stage

Definition at line 58 of file PortraitController.cs.

Member Function Documentation

◆ Awake()

virtual void Fungus.PortraitController.Awake ( )
protectedvirtual

Definition at line 65 of file PortraitController.cs.

◆ CleanPortraitOptions()

virtual PortraitOptions Fungus.PortraitController.CleanPortraitOptions ( PortraitOptions  options)
protectedvirtual

Makes sure all options are set correctly so it won't break whatever command it's sent to

Parameters
options
Returns

Definition at line 94 of file PortraitController.cs.

◆ CreatePortraitObject()

virtual void Fungus.PortraitController.CreatePortraitObject ( Character  character,
float  fadeDuration 
)
protectedvirtual

Creates and sets the portrait image for a character

Parameters
character
fadeDuration

Definition at line 185 of file PortraitController.cs.

◆ DoMoveTween() [1/2]

virtual void Fungus.PortraitController.DoMoveTween ( Character  character,
RectTransform  fromPosition,
RectTransform  toPosition,
float  moveDuration,
Boolean  waitUntilFinished 
)
protectedvirtual

Definition at line 256 of file PortraitController.cs.

◆ DoMoveTween() [2/2]

virtual void Fungus.PortraitController.DoMoveTween ( PortraitOptions  options)
protectedvirtual

Definition at line 268 of file PortraitController.cs.

◆ FinishCommand()

virtual void Fungus.PortraitController.FinishCommand ( PortraitOptions  options)
protectedvirtual

Definition at line 70 of file PortraitController.cs.

◆ Hide() [1/4]

virtual void Fungus.PortraitController.Hide ( Character  character)
virtual

Simple character hide command

Parameters
characterCharacter to hide

Definition at line 528 of file PortraitController.cs.

◆ Hide() [2/4]

virtual void Fungus.PortraitController.Hide ( Character  character,
string  toPosition 
)
virtual

Move the character to a position then hide it

Parameters
characterCharacter to hide
toPositionWhere the character will disapear to

Definition at line 541 of file PortraitController.cs.

◆ Hide() [3/4]

virtual void Fungus.PortraitController.Hide ( Table  optionsTable)
virtual

From lua, you can pass an options table with named arguments example: stage.hide{character=jill, toPosition="left"} Any option available in the PortraitOptions is available from Lua

Parameters
optionsTableMoonsharp Table

Definition at line 558 of file PortraitController.cs.

◆ Hide() [4/4]

virtual void Fungus.PortraitController.Hide ( PortraitOptions  options)
virtual

Hide portrait with provided options

Definition at line 566 of file PortraitController.cs.

◆ MoveToFront() [1/2]

virtual void Fungus.PortraitController.MoveToFront ( Character  character)
virtual

Moves Character in front of other characters on stage

Definition at line 360 of file PortraitController.cs.

◆ MoveToFront() [2/2]

virtual void Fungus.PortraitController.MoveToFront ( PortraitOptions  options)
virtual

Moves Character in front of other characters on stage

Definition at line 371 of file PortraitController.cs.

◆ RunPortraitCommand()

virtual void Fungus.PortraitController.RunPortraitCommand ( PortraitOptions  options,
Action  onComplete 
)
virtual

Using all portrait options available, run any portrait command.

Parameters
optionsPortrait Options
onCompleteThe function that will run once the portrait command finishes

Definition at line 307 of file PortraitController.cs.

◆ SetDimmed()

virtual void Fungus.PortraitController.SetDimmed ( Character  character,
bool  dimmedState 
)
virtual

Sets the dimmed state of a character on the stage.

Definition at line 599 of file PortraitController.cs.

◆ SetRectTransform()

static void Fungus.PortraitController.SetRectTransform ( RectTransform  oldRectTransform,
RectTransform  newRectTransform 
)
static

Performs a deep copy of all values from one RectTransform to another.

Definition at line 289 of file PortraitController.cs.

◆ SetupPortrait()

virtual void Fungus.PortraitController.SetupPortrait ( PortraitOptions  options)
protectedvirtual

Definition at line 233 of file PortraitController.cs.

◆ Show() [1/4]

virtual void Fungus.PortraitController.Show ( Character  character,
string  position 
)
virtual

Shows character at a named position in the stage

Parameters
character
positionNamed position on stage

Definition at line 383 of file PortraitController.cs.

◆ Show() [2/4]

virtual void Fungus.PortraitController.Show ( Character  character,
string  portrait,
string  fromPosition,
string  toPosition 
)
virtual

Shows character moving from a position to a position

Parameters
character
portrait
fromPositionWhere the character will appear
toPositionWhere the character will move to

Definition at line 399 of file PortraitController.cs.

◆ Show() [3/4]

virtual void Fungus.PortraitController.Show ( Table  optionsTable)
virtual

From lua, you can pass an options table with named arguments example: stage.show{character=jill, portrait="happy", fromPosition="right", toPosition="left"} Any option available in the PortraitOptions is available from Lua

Parameters
optionsTableMoonsharp Table

Definition at line 418 of file PortraitController.cs.

◆ Show() [4/4]

virtual void Fungus.PortraitController.Show ( PortraitOptions  options)
virtual

Show portrait with the supplied portrait options

Parameters
options

Definition at line 427 of file PortraitController.cs.

◆ ShowPortrait()

virtual void Fungus.PortraitController.ShowPortrait ( Character  character,
string  portrait 
)
virtual

Simple show command that shows the character with an available named portrait

Parameters
characterCharacter to show
portraitNamed portrait to show for the character, i.e. "angry", "happy", etc

Definition at line 506 of file PortraitController.cs.

◆ WaitUntilFinished()

virtual IEnumerator Fungus.PortraitController.WaitUntilFinished ( float  duration,
Action  onComplete = null 
)
protectedvirtual

Definition at line 212 of file PortraitController.cs.

Member Data Documentation

◆ stage

Stage Fungus.PortraitController.stage
protected

Definition at line 63 of file PortraitController.cs.

◆ waitTimer

float Fungus.PortraitController.waitTimer
protected

Definition at line 61 of file PortraitController.cs.


The documentation for this class was generated from the following file: