v3.6.1 Documentation
Fungus.Stage Class Reference

Define a set of screen positions where character sprites can be displayed. More...

Inheritance diagram for Fungus.Stage:
Fungus.PortraitController

Public Member Functions

RectTransform GetPosition (string positionString)
 Searches the stage's named positions If none matches the string provided, give a warning and return a new RectTransform More...
 
- Public Member Functions inherited from Fungus.PortraitController
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 Stage GetActiveStage ()
 Returns the currently active stage. More...
 
- Static Public Member Functions inherited from Fungus.PortraitController
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 OnEnable ()
 
virtual void OnDisable ()
 
virtual void Start ()
 
- Protected Member Functions inherited from Fungus.PortraitController
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

Canvas portraitCanvas
 
bool dimPortraits
 
Color dimColor =new Color(0.5f, 0.5f, 0.5f, 1f)
 
float fadeDuration = 0.5f
 
float moveDuration = 1f
 
LeanTweenType fadeEaseType
 
Vector2 shiftOffset
 
Image defaultPosition
 
List< RectTransform > positions
 
List< CharactercharactersOnStage = new List<Character>()
 
- Protected Attributes inherited from Fungus.PortraitController
float waitTimer
 
Stage stage
 

Static Protected Attributes

static List< StageactiveStages = new List<Stage>()
 

Properties

static List< StageActiveStages [get]
 Gets the list of active stages. More...
 
virtual Canvas PortraitCanvas [get]
 Canvas object containing the stage positions. More...
 
virtual bool DimPortraits [get, set]
 Dim portraits when a character is not speaking. More...
 
virtual Color DimColor [get, set]
 Choose a dimColor. More...
 
virtual float FadeDuration [get, set]
 Duration for fading character portraits in / out. More...
 
virtual float MoveDuration [get, set]
 Duration for moving characters to a new position. More...
 
virtual LeanTweenType FadeEaseType [get]
 Ease type for the fade tween. More...
 
virtual Vector2 ShiftOffset [get]
 Constant offset to apply to portrait position. More...
 
virtual Image DefaultPosition [get]
 The position object where characters appear by default. More...
 
virtual List< RectTransform > Positions [get]
 List of stage position rect transforms in the stage. More...
 
virtual List< CharacterCharactersOnStage [get]
 List of currently active characters on the stage. More...
 

Detailed Description

Define a set of screen positions where character sprites can be displayed.

Definition at line 15 of file Stage.cs.

Member Function Documentation

◆ GetActiveStage()

static Stage Fungus.Stage.GetActiveStage ( )
static

Returns the currently active stage.

Definition at line 81 of file Stage.cs.

◆ GetPosition()

RectTransform Fungus.Stage.GetPosition ( string  positionString)

Searches the stage's named positions If none matches the string provided, give a warning and return a new RectTransform

Definition at line 146 of file Stage.cs.

◆ OnDisable()

virtual void Fungus.Stage.OnDisable ( )
protectedvirtual

Definition at line 56 of file Stage.cs.

◆ OnEnable()

virtual void Fungus.Stage.OnEnable ( )
protectedvirtual

Definition at line 48 of file Stage.cs.

◆ Start()

virtual void Fungus.Stage.Start ( )
protectedvirtual

Definition at line 61 of file Stage.cs.

Member Data Documentation

◆ activeStages

List<Stage> Fungus.Stage.activeStages = new List<Stage>()
staticprotected

Definition at line 46 of file Stage.cs.

◆ charactersOnStage

List<Character> Fungus.Stage.charactersOnStage = new List<Character>()
protected

Definition at line 44 of file Stage.cs.

◆ defaultPosition

Image Fungus.Stage.defaultPosition
protected

Definition at line 39 of file Stage.cs.

◆ dimColor

Color Fungus.Stage.dimColor =new Color(0.5f, 0.5f, 0.5f, 1f)
protected

Definition at line 24 of file Stage.cs.

◆ dimPortraits

bool Fungus.Stage.dimPortraits
protected

Definition at line 21 of file Stage.cs.

◆ fadeDuration

float Fungus.Stage.fadeDuration = 0.5f
protected

Definition at line 27 of file Stage.cs.

◆ fadeEaseType

LeanTweenType Fungus.Stage.fadeEaseType
protected

Definition at line 33 of file Stage.cs.

◆ moveDuration

float Fungus.Stage.moveDuration = 1f
protected

Definition at line 30 of file Stage.cs.

◆ portraitCanvas

Canvas Fungus.Stage.portraitCanvas
protected

Definition at line 18 of file Stage.cs.

◆ positions

List<RectTransform> Fungus.Stage.positions
protected

Definition at line 42 of file Stage.cs.

◆ shiftOffset

Vector2 Fungus.Stage.shiftOffset
protected

Definition at line 36 of file Stage.cs.

Property Documentation

◆ ActiveStages

List<Stage> Fungus.Stage.ActiveStages
staticget

Gets the list of active stages.

Definition at line 76 of file Stage.cs.

◆ CharactersOnStage

virtual List<Character> Fungus.Stage.CharactersOnStage
get

List of currently active characters on the stage.

Definition at line 140 of file Stage.cs.

◆ DefaultPosition

virtual Image Fungus.Stage.DefaultPosition
get

The position object where characters appear by default.

Definition at line 130 of file Stage.cs.

◆ DimColor

virtual Color Fungus.Stage.DimColor
getset

Choose a dimColor.

Definition at line 105 of file Stage.cs.

◆ DimPortraits

virtual bool Fungus.Stage.DimPortraits
getset

Dim portraits when a character is not speaking.

Definition at line 100 of file Stage.cs.

◆ FadeDuration

virtual float Fungus.Stage.FadeDuration
getset

Duration for fading character portraits in / out.

Definition at line 110 of file Stage.cs.

◆ FadeEaseType

virtual LeanTweenType Fungus.Stage.FadeEaseType
get

Ease type for the fade tween.

Definition at line 120 of file Stage.cs.

◆ MoveDuration

virtual float Fungus.Stage.MoveDuration
getset

Duration for moving characters to a new position.

Definition at line 115 of file Stage.cs.

◆ PortraitCanvas

virtual Canvas Fungus.Stage.PortraitCanvas
get

Canvas object containing the stage positions.

Definition at line 95 of file Stage.cs.

◆ Positions

virtual List<RectTransform> Fungus.Stage.Positions
get

List of stage position rect transforms in the stage.

Definition at line 135 of file Stage.cs.

◆ ShiftOffset

virtual Vector2 Fungus.Stage.ShiftOffset
get

Constant offset to apply to portrait position.

Definition at line 125 of file Stage.cs.


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