Class ItemGetMessage
Represents a message displayed when an item is obtained in the game.
Namespace: WeaverCore.Assets.Components
Assembly: WeaverCore.dll
Syntax
public class ItemGetMessage : MonoBehaviour
Properties
| Edit this page View SourceIcon
Gets or sets the icon of the item.
Declaration
public Sprite Icon { get; set; }
Property Value
Type | Description |
---|---|
Sprite |
Text
Gets or sets the text of the item message.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceHide()
Hides the item message with a fade-out animation.
Declaration
public void Hide()
Show()
Shows the item message with a fade-in animation.
Declaration
public void Show()
ShowInstant()
Displays the item message instantly without animation.
Declaration
public void ShowInstant()
Spawn(Sprite, string)
Spawns an item message for a specific item sprite and text.
Declaration
public static ItemGetMessage Spawn(Sprite itemSprite, string itemText)
Parameters
Type | Name | Description |
---|---|---|
Sprite | itemSprite | The sprite of the item to display. |
string | itemText | The text to display for the item message. |
Returns
Type | Description |
---|---|
ItemGetMessage | The spawned ItemGetMessage instance. |
SpawnCharm(int)
Spawns an item message for a specific charm ID.
Declaration
public static ItemGetMessage SpawnCharm(int charmID)
Parameters
Type | Name | Description |
---|---|---|
int | charmID | The ID of the charm to display the message for. |
Returns
Type | Description |
---|---|
ItemGetMessage | The spawned ItemGetMessage instance. |
SpawnCharm(IWeaverCharm)
Spawns an item message for a specific WeaverCharm.
Declaration
public static ItemGetMessage SpawnCharm(IWeaverCharm charm)
Parameters
Type | Name | Description |
---|---|---|
IWeaverCharm | charm | The WeaverCharm to display the message for. |
Returns
Type | Description |
---|---|
ItemGetMessage | The spawned ItemGetMessage instance. |