Table of Contents

Class CapturePointTemplate

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Template defining a capture point's parameters for PvP or general objective capture.

[CreateAssetMenu(fileName = "New Capture Point", menuName = "FishMMO/Interactable/Capture Point", order = 1)]
public class CapturePointTemplate : CachedScriptableObject<CapturePointTemplate>, ICachedObject
Inheritance
Object
ScriptableObject
CapturePointTemplate
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

Description

Description displayed in tooltips or UI.

[TextArea(2, 4)]
public string Description

Field Value

string

IconReference

Addressable reference to the icon sprite for this capture point.

public AssetReferenceSprite IconReference

Field Value

AssetReferenceSprite

InteractionsToCapture

Number of interactions required to capture this point.

[Min(1)]
public int InteractionsToCapture

Field Value

int

PointValue

Score value awarded when this point is captured.

[Min(1)]
public int PointValue

Field Value

int

ProgressDecaySeconds

Seconds of inactivity after which an unfinished capture resets. 0 disables decay.

[Tooltip("Seconds of inactivity before an unfinished capture resets to zero. 0 = never decays.")]
[Min(0)]
public float ProgressDecaySeconds

Field Value

float

Remarks

Without decay a partial capture is permanent: a player who applies four of five interactions and walks away leaves the point sitting at four forever, so the next person to touch it — possibly hours later, possibly an enemy — completes a capture they did almost none of. It also makes InteractionsToCapture meaningless as a cost, since the total can be paid in arbitrarily small instalments across a whole session.

The timer restarts on every interaction that adds progress, so a player who keeps working at the point never loses it; it only expires once they stop.

Properties

Icon

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

public Sprite Icon { get; }

Property Value

Sprite

Name

The display name of this capture point template.

public string Name { get; }

Property Value

string

Methods

OnLoad(string, string, int)

Called when the capture point 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 capture point 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