v3.6.1 Documentation
Fungus.Character Class Reference

A Character that can be used in dialogue via the Say, Conversation and Portrait commands. More...

Inheritance diagram for Fungus.Character:
Fungus.ILocalizable

Public Member Functions

string GetObjectName ()
 Returns the name of the game object. More...
 
virtual bool NameStartsWith (string matchString)
 Returns true if the character name starts with the specified string. More...
 
virtual Sprite GetPortrait (string portraitString)
 Looks for a portrait by name on a character If none is found, give a warning and return a blank sprite More...
 
virtual string GetStandardText ()
 Gets the standard (non-localized) text. More...
 
virtual void SetStandardText (string standardText)
 Sets the standard (non-localized) text. More...
 
virtual string GetDescription ()
 Gets the description used to help localizers. More...
 
virtual string GetStringId ()
 Gets the unique string identifier. More...
 

Protected Member Functions

virtual void OnEnable ()
 
virtual void OnDisable ()
 

Protected Attributes

string nameText
 
Color nameColor = Color.white
 
AudioClip soundEffect
 
List< Sprite > portraits
 
FacingDirection portraitsFace
 
SayDialog setSayDialog
 
string description
 
PortraitState portaitState = new PortraitState()
 

Static Protected Attributes

static List< CharacteractiveCharacters = new List<Character>()
 

Properties

static List< CharacterActiveCharacters [get]
 Gets the list of active characters. More...
 
virtual string NameText [get]
 Character name as displayed in Say Dialog. More...
 
virtual Color NameColor [get]
 Color to display the character name in Say Dialog. More...
 
virtual AudioClip SoundEffect [get]
 Sound effect to play when this character is speaking. More...
 
virtual List< Sprite > Portraits [get]
 List of portrait images that can be displayed for this character. More...
 
virtual FacingDirection PortraitsFace [get]
 Direction that portrait sprites face. More...
 
virtual Sprite ProfileSprite [get, set]
 Currently display profile sprite for this character. More...
 
virtual PortraitState State [get]
 Current display state of this character's portrait. More...
 
virtual SayDialog SetSayDialog [get]
 Sets the active Say dialog with a reference to a Say Dialog object in the scene. More...
 

Detailed Description

A Character that can be used in dialogue via the Say, Conversation and Portrait commands.

Definition at line 15 of file Character.cs.

Member Function Documentation

◆ GetDescription()

virtual string Fungus.Character.GetDescription ( )
virtual

Gets the description used to help localizers.

Returns
The description.

Implements Fungus.ILocalizable.

Definition at line 160 of file Character.cs.

◆ GetObjectName()

string Fungus.Character.GetObjectName ( )

Returns the name of the game object.

Definition at line 109 of file Character.cs.

◆ GetPortrait()

virtual Sprite Fungus.Character.GetPortrait ( string  portraitString)
virtual

Looks for a portrait by name on a character If none is found, give a warning and return a blank sprite

Definition at line 129 of file Character.cs.

◆ GetStandardText()

virtual string Fungus.Character.GetStandardText ( )
virtual

Gets the standard (non-localized) text.

Implements Fungus.ILocalizable.

Definition at line 150 of file Character.cs.

◆ GetStringId()

virtual string Fungus.Character.GetStringId ( )
virtual

Gets the unique string identifier.

Implements Fungus.ILocalizable.

Definition at line 165 of file Character.cs.

◆ NameStartsWith()

virtual bool Fungus.Character.NameStartsWith ( string  matchString)
virtual

Returns true if the character name starts with the specified string.

Case insensitive.

Definition at line 114 of file Character.cs.

◆ OnDisable()

virtual void Fungus.Character.OnDisable ( )
protectedvirtual

Definition at line 51 of file Character.cs.

◆ OnEnable()

virtual void Fungus.Character.OnEnable ( )
protectedvirtual

Definition at line 43 of file Character.cs.

◆ SetStandardText()

virtual void Fungus.Character.SetStandardText ( string  standardText)
virtual

Sets the standard (non-localized) text.

Parameters
standardTextStandard text.

Implements Fungus.ILocalizable.

Definition at line 155 of file Character.cs.

Member Data Documentation

◆ activeCharacters

List<Character> Fungus.Character.activeCharacters = new List<Character>()
staticprotected

Definition at line 41 of file Character.cs.

◆ description

string Fungus.Character.description
protected

Definition at line 37 of file Character.cs.

◆ nameColor

Color Fungus.Character.nameColor = Color.white
protected

Definition at line 21 of file Character.cs.

◆ nameText

string Fungus.Character.nameText
protected

Definition at line 18 of file Character.cs.

◆ portaitState

PortraitState Fungus.Character.portaitState = new PortraitState()
protected

Definition at line 39 of file Character.cs.

◆ portraits

List<Sprite> Fungus.Character.portraits
protected

Definition at line 27 of file Character.cs.

◆ portraitsFace

FacingDirection Fungus.Character.portraitsFace
protected

Definition at line 30 of file Character.cs.

◆ setSayDialog

SayDialog Fungus.Character.setSayDialog
protected

Definition at line 33 of file Character.cs.

◆ soundEffect

AudioClip Fungus.Character.soundEffect
protected

Definition at line 24 of file Character.cs.

Property Documentation

◆ ActiveCharacters

List<Character> Fungus.Character.ActiveCharacters
staticget

Gets the list of active characters.

Definition at line 61 of file Character.cs.

◆ NameColor

virtual Color Fungus.Character.NameColor
get

Color to display the character name in Say Dialog.

Definition at line 71 of file Character.cs.

◆ NameText

virtual string Fungus.Character.NameText
get

Character name as displayed in Say Dialog.

Definition at line 66 of file Character.cs.

◆ Portraits

virtual List<Sprite> Fungus.Character.Portraits
get

List of portrait images that can be displayed for this character.

Definition at line 82 of file Character.cs.

◆ PortraitsFace

virtual FacingDirection Fungus.Character.PortraitsFace
get

Direction that portrait sprites face.

Definition at line 87 of file Character.cs.

◆ ProfileSprite

virtual Sprite Fungus.Character.ProfileSprite
getset

Currently display profile sprite for this character.

The profile sprite.

Definition at line 93 of file Character.cs.

◆ SetSayDialog

virtual SayDialog Fungus.Character.SetSayDialog
get

Sets the active Say dialog with a reference to a Say Dialog object in the scene.

This Say Dialog will be used whenever the character speaks.

Definition at line 104 of file Character.cs.

◆ SoundEffect

virtual AudioClip Fungus.Character.SoundEffect
get

Sound effect to play when this character is speaking.

The sound effect.

Definition at line 77 of file Character.cs.

◆ State

virtual PortraitState Fungus.Character.State
get

Current display state of this character's portrait.

The state.

Definition at line 99 of file Character.cs.


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