Class WeaverBossTitle
Used to show an area title in the corner of the screen. Used to show the name of bosses or NPCs
Namespace: WeaverCore.Assets.Components
Assembly: WeaverCore.dll
Syntax
[ExecuteInEditMode]
public class WeaverBossTitle : MonoBehaviour
Fields
| Edit this page View SourceFadedInColor
The color the text will be when faded in
Declaration
public Color FadedInColor
Field Value
| Type | Description |
|---|---|
| Color |
FadedOutColor
The color the text will be when faded out
Declaration
public Color FadedOutColor
Field Value
| Type | Description |
|---|---|
| Color |
Properties
| Edit this page View SourceBottomText
The bottom (larger) text in the title
Declaration
public string BottomText { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
BottomTextObject
The object that displays the bottom (larger) text in the title
Declaration
public TextMeshProUGUI BottomTextObject { get; }
Property Value
| Type | Description |
|---|---|
| TextMeshProUGUI |
DoingFade
Is the text currently fading in/out?
Declaration
public bool DoingFade { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Position
The screen-relative position of the area title
Declaration
public AreaTitlePosition Position { get; set; }
Property Value
| Type | Description |
|---|---|
| AreaTitlePosition |
TopText
The top (smaller) text in the title
Declaration
public string TopText { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TopTextObject
The object used to display the top (smaller) text in the title
Declaration
public TextMeshProUGUI TopTextObject { get; }
Property Value
| Type | Description |
|---|---|
| TextMeshProUGUI |
Methods
| Edit this page View SourceDelete()
Deletes the Area Title
Declaration
public void Delete()
DoFade(float, float, float, bool)
Causes the area title to fade
Declaration
public void DoFade(float fadeInTime, float waitTime, float fadeOutTime, bool deleteWhenDone)
Parameters
| Type | Name | Description |
|---|---|---|
| float | fadeInTime | The amount of time the text will take to fade in |
| float | waitTime | How long the text will wait before fading out |
| float | fadeOutTime | The amount of time the text will take to fade out |
| bool | deleteWhenDone | Should the WeaverBossTitle be deleted when done? |
Spawn(float, float, float, bool)
Spawns an Area Title
Declaration
public static WeaverBossTitle Spawn(float fadeInTime = 1.5, float waitTime = 4.5, float fadeOutTime = 1.5, bool deleteWhenDone = true)
Parameters
| Type | Name | Description |
|---|---|---|
| float | fadeInTime | The amount of time the text will take to fade in |
| float | waitTime | How long the text will wait before fading out |
| float | fadeOutTime | The amount of time the text will take to fade out |
| bool | deleteWhenDone | Should the WeaverBossTitle be deleted when done? |
Returns
| Type | Description |
|---|---|
| WeaverBossTitle | Returns the new area title object |
Spawn(string, string, float, float, float, bool)
Spawns an Area Title
Declaration
public static WeaverBossTitle Spawn(string topText, string bottomText, float fadeInTime = 1.5, float waitTime = 4.5, float fadeOutTime = 1.5, bool deleteWhenDone = true)
Parameters
| Type | Name | Description |
|---|---|---|
| string | topText | The top (smaller) text |
| string | bottomText | The bottom (larger) text |
| float | fadeInTime | The amount of time the text will take to fade in |
| float | waitTime | How long the text will wait before fading out |
| float | fadeOutTime | The amount of time the text will take to fade out |
| bool | deleteWhenDone | Should the WeaverBossTitle be deleted when done? |
Returns
| Type | Description |
|---|---|
| WeaverBossTitle | Returns the new area title object |
SpawnNoFade()
Spawns the Area Title, but will not fade in/out by default. You will need to control this manually by calling DoFade(float, float, float, bool)
Declaration
public static WeaverBossTitle SpawnNoFade()
Returns
| Type | Description |
|---|---|
| WeaverBossTitle | Returns the new area title object |
SpawnNoFade(string, string)
Spawns the Area Title, but will not fade in/out by default. You will need to control this manually by calling DoFade(float, float, float, bool)
Declaration
public static WeaverBossTitle SpawnNoFade(string topText, string bottomText)
Parameters
| Type | Name | Description |
|---|---|---|
| string | topText | The top (smaller) text |
| string | bottomText | The bottom (larger) text |
Returns
| Type | Description |
|---|---|
| WeaverBossTitle | Returns the new area title object |