Table of Contents

Class ShrineTemplate

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Template defining a shrine's healing and buff effects. Shrines can heal health, mana, or both, and optionally apply a buff on interaction.

[CreateAssetMenu(fileName = "New Shrine", menuName = "FishMMO/Interactable/Shrine", order = 1)]
public class ShrineTemplate : CachedScriptableObject<ShrineTemplate>, ICachedObject
Inheritance
Object
ScriptableObject
ShrineTemplate
Implements
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetEntityId()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Fields

Buff

[Header("Buff")]
public BaseBuffTemplate Buff

Field Value

BaseBuffTemplate

BuffStackCount

Number of buff stacks to apply. Only used when Buff is not null.

[Min(1)]
public int BuffStackCount

Field Value

int

CooldownSeconds

[Header("Cooldown")]
[Tooltip("Seconds one character must wait between uses of this shrine. 0 = no cooldown.")]
[Min(0)]
public float CooldownSeconds

Field Value

float

Description

Description displayed in tooltips or UI.

[TextArea(2, 4)]
public string Description

Field Value

string

HealHealth

[Header("Health")]
public bool HealHealth

Field Value

bool

HealMana

[Header("Mana")]
public bool HealMana

Field Value

bool

HealthHealPercent

Percentage of max health to restore (0.0–1.0). Only used when HealHealth is true.

[Range(0, 1)]
public float HealthHealPercent

Field Value

float

IconReference

Addressable reference to the icon sprite for this shrine.

public AssetReferenceSprite IconReference

Field Value

AssetReferenceSprite

ManaHealPercent

Percentage of max mana to restore (0.0–1.0). Only used when HealMana is true.

[Range(0, 1)]
public float ManaHealPercent

Field Value

float

UsableInCombat

Whether the shrine may be used while the character is in combat.

[Tooltip("Allow this shrine to be used while in combat.")]
public bool UsableInCombat

Field Value

bool

Remarks

Off by default. A shrine is a restore point between fights; a full heal available mid-fight is a combat mechanic, and one worth opting into deliberately rather than inheriting by omission.

Properties

Icon

The icon for this shrine (loaded at runtime on client).

public Sprite Icon { get; }

Property Value

Sprite

Name

The display name of this shrine template.

public string Name { get; }

Property Value

string

Methods

OnLoad(string, string, int)

Called when the shrine template is loaded into cache. Loads the icon on the client.

public override void OnLoad(string typeName, string resourceName, int resourceID)

Parameters

typeName string
resourceName string
resourceID int

OnUnload(string, string, int)

Called when the shrine template is unloaded from cache. Releases the icon on the client.

public override void OnUnload(string typeName, string resourceName, int resourceID)

Parameters

typeName string
resourceName string
resourceID int