TilePlus Version 5
Unity3D Tilemap Extension
Loading...
Searching...
No Matches
TilePlus.IScriptableService Interface Reference

This interface lets TpLib's update pump (TpLibTasks) know what to update (not all SRS' need it) and if the SRS is ready to update (may not need it). Default is no updating and an empty Update method. It's also used to indicate if messages can be sent to the Service as well as what types of messages as well as indicating if this service should persist thru scene changes. More...

Inheritance diagram for TilePlus.IScriptableService:

Public Member Functions

void Update (float deltaTime)
 Update implementation: Must override with explicit implementation.
void MessageTarget (ObjectPacket packet)
 If Accepts messages is true, reimplement this to get messaged.

Properties

string ServiceName [get]
 A name for this service: used for profiling. Ordinarily just returns the 'name' property of the Service S.O. instance.
bool PeristThruReload [get]
 If true, this will not be deleted when the Unity scene changes.
bool WantsUpdate [get]
 Does this SRS want an update tick? MUST override if you're providing an Update method. MUST override with explicit implementation.
bool ReadyForUpdate [get]
 Is this SRS ready for an update? MUST Override if your SRS doesn't always need an update. MUST override with explicit implementation.
string[] AcceptableMessages [get]
 If true, can accept ObjectPacket messages from the Service Manager with command-strings matching those returned here.

Detailed Description

This interface lets TpLib's update pump (TpLibTasks) know what to update (not all SRS' need it) and if the SRS is ready to update (may not need it). Default is no updating and an empty Update method. It's also used to indicate if messages can be sent to the Service as well as what types of messages as well as indicating if this service should persist thru scene changes.

Member Function Documentation

◆ MessageTarget()

void TilePlus.IScriptableService.MessageTarget ( ObjectPacket packet)

If Accepts messages is true, reimplement this to get messaged.

Parameters
packetAn ObjectPacket

the 'command' string is used for a command.

◆ Update()

void TilePlus.IScriptableService.Update ( float deltaTime)

Update implementation: Must override with explicit implementation.

Parameters
deltaTime

Property Documentation

◆ AcceptableMessages

string [] TilePlus.IScriptableService.AcceptableMessages
get

If true, can accept ObjectPacket messages from the Service Manager with command-strings matching those returned here.

This is evaluated ONCE, when the service is started. Returning new string[1]{"XYZZY"} would mean messages with XYZZY as the command are accepted. Returning Empty array as below (the default) == NO messages accepted. Returning single-item array with first item == "__ALL__" => ALL messages. like this: new string[1] { string.Empty }; Only use "__ALL__" by itself or your service may get multiple copies of certain messages. /remarks>

◆ PeristThruReload

bool TilePlus.IScriptableService.PeristThruReload
get

If true, this will not be deleted when the Unity scene changes.

◆ ReadyForUpdate

bool TilePlus.IScriptableService.ReadyForUpdate
get

Is this SRS ready for an update? MUST Override if your SRS doesn't always need an update. MUST override with explicit implementation.

◆ ServiceName

string TilePlus.IScriptableService.ServiceName
get

A name for this service: used for profiling. Ordinarily just returns the 'name' property of the Service S.O. instance.

Implemented in TilePlus.ScriptableRuntimeService< T >.

◆ WantsUpdate

bool TilePlus.IScriptableService.WantsUpdate
get

Does this SRS want an update tick? MUST override if you're providing an Update method. MUST override with explicit implementation.


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