Mercury Messaging
Documentation for the Mercury Messaging Framework
MercuryMessaging.Task.MmTaskManager< U > Class Template Reference

Class to manage a collection of tasks. More...

Inheritance diagram for MercuryMessaging.Task.MmTaskManager< U >:
MercuryMessaging.MmBaseResponder MercuryMessaging.MmResponder MercuryMessaging.IMmResponder

Public Member Functions

override void Awake ()
 Get attached ItaskInfoCollectionLoader, which must be attached to the same game object. More...
 
override void Start ()
 Prepare the tasks that were loaded. More...
 
MmTaskResponder< U > GetCurrentTaskResponder ()
 Get current task responder. More...
 
MmTaskResponder< U > GetTaskResponder (MmRelayNode _mmRelayNode)
 Extract a task responder from a given MmRelayNode. More...
 
virtual void ProceedToFirstTask ()
 Set the current pointer to the first task in the list. More...
 
virtual void PrepareTasks ()
 Prepare the tasks that were loaded by the TaskInfoCollectionLoader. More...
 
virtual void ProceedToNextTask ()
 Move current task pointer to the next task info. If the instance can, it will attempt to trigger a switch message to move the FSM to the next task state. More...
 
virtual bool ShouldTriggerSwitch ()
 Base class implementation of ShouldTriggerSwitch always returns true. More...
 
LinkedListNode< U > GetNodeAt (int index)
 Index accessor for LinkedList of task infos. More...
 
virtual void ApplySequenceID ()
 Apply the user-based sequence ID to the associated MmTaskUserConfigurator. More...
 
- Public Member Functions inherited from MercuryMessaging.MmBaseResponder
override void MmInvoke (MmMessageType msgType, MmMessage message)
 Invoke an MmMethod. Implements a switch that handles the different MmMethods defined by default set in MmMethod MmMethod More...
 
virtual void SetActive (bool active)
 Handle MmMethod: SetActive More...
 
virtual void Initialize ()
 Handle MmMethod: Initialize Initialize allows you to provide additional initialization logic in-between calls to Monobehavior provided Awake() and Start() calls. More...
 
virtual void Refresh (List< MmTransform > transformList)
 Handle MmMethod: Refresh More...
 
override MmRelayNode GetRelayNode ()
 Implementation of IMmResponder's GetRelayNode. More...
 
- Public Member Functions inherited from MercuryMessaging.MmResponder
virtual void Update ()
 Base Update of MmResponder Derived classes should always override. More...
 
virtual void MmOnAwakeComplete ()
 Post Awake callback used between objects implementing this interface. This allows for initialization steps that must occur before one instance's Awake and its Start. More...
 
virtual void MmOnStartComplete ()
 Post Start callback used between objects implementing this interface This allows for initialization steps that must occur before one instance's Start and its first Update. More...
 
virtual void MmRegisterAwakeCompleteCallback (IMmCallback callback)
 It is possible that certain handles are not going to be in-place when registration of the OnAwakeComplete callback is invoked. The is especially true in scenarios where MmRelayNodes are networked. This allows for a deferred registration, eliminating most instances where the Awake callback invocations fail. More...
 
virtual void MmRegisterStartCompleteCallback (IMmCallback callback)
 It is possible that certain handles are not going to be in-place when registration of the OnStartComplete callback is invoked. The is especially true in scenarios where MmRelayNodes are networked. This allows for a deferred registration, eliminating most instances where the Start callback invocations fail. More...
 

Public Attributes

MmRelaySwitchNode TasksNode
 This switch node allows you to iterate through a set of tasks using the same mechanisms that allow you to iterate through an FSM of MmResponders. More...
 
LinkedList< U > TaskInfos
 The loaded task infos. More...
 
MmTaskUserConfigurator MmTaskUserData
 Contains information of where to load task data, and which tasks to load based on user ID. More...
 
bool SavePartialProgression = false
 Allow task manager to save partial system progression info More...
 

Protected Attributes

LinkedListNode< U > currentTaskInfo
 Node of currently selected task. More...
 

Properties

CurrentTaskInfo [get, set]
 Current task info. More...
 
NextTaskInfo [get]
 Next task info. More...
 
PrevTaskInfo [get]
 Previous task info. More...
 
int TotalTasksWithCurrentName [get]
 Total number of task infos that have the same name. More...
 
ITaskInfoCollectionLoader< U > TaskInfoCollectionLoader [get]
 Handle to the task info collection loader that is used to load the task collection. More...
 
- Properties inherited from MercuryMessaging.MmResponder
GameObject MmGameObject [get]
 Handle to an instance's GameObject. More...
 
MmTag Tag [get, set]
 MmTags allow you to specify filters for execution in Mercury XM graphs. More...
 
bool TagCheckEnabled [get, set]
 Determines whether tag checking is enabled for this IMmResponder More...
 
- Properties inherited from MercuryMessaging.IMmResponder
MmTag Tag [get, set]
 MmTags allow you to specify filters for execution in MercuryMessaging Hierarchies. MmTag More...
 
GameObject MmGameObject [get]
 Handle to an instance's GameObject. More...
 
bool TagCheckEnabled [get, set]
 Determines whether tag checking is enabled for this IMmResponder More...
 

Additional Inherited Members

- Protected Member Functions inherited from MercuryMessaging.MmBaseResponder
virtual void Switch (string iName)
 Handle MmMethod: Switch More...
 
virtual void Complete (bool active)
 Handle MmMethod: Switch More...
 
virtual void ApplyTaskInfo (IMmSerializable serializableValue)
 Handle MmMethod: TaskInfo Given a IMmSerializable, extract TaskInfo. More...
 
virtual void ReceivedMessage (MmMessage message)
 Handle MmMethod: Base MmMessage. Override this to handle base Mercury Messages. More...
 
virtual void ReceivedMessage (MmMessageBool message)
 Handle MmMethod: MessageBool. Override this to handle Mercury's bool messages. More...
 
virtual void ReceivedMessage (MmMessageByteArray message)
 Handle MmMethod: MessageByteArray. Override this to handle Mercury's byte array messages. More...
 
virtual void ReceivedMessage (MmMessageFloat message)
 Handle MmMethod: MessageFloat. Override this to handle Mercury's float messages. More...
 
virtual void ReceivedMessage (MmMessageInt message)
 Handle MmMethod: MessageInt. Override this to handle Mercury's int messages. More...
 
virtual void ReceivedMessage (MmMessageSerializable message)
 Handle MmMethod: MessageSerializable. Override this to handle Mercury's serializable messages. More...
 
virtual void ReceivedMessage (MmMessageString message)
 Handle MmMethod: MessageString Override this to handle Mercury's string messages. More...
 
virtual void ReceivedMessage (MmMessageTransform message)
 Handle MmMethod: MessageTransform Override this to handle Mercury's transform messages. More...
 
virtual void ReceivedMessage (MmMessageTransformList message)
 Handle MmMethod: MessageTransformList Override this to handle Mercury's transform list messages. More...
 
virtual void ReceivedMessage (MmMessageVector3 message)
 Handle MmMethod: MessageVector3 Override this to handle Mercury's Vector3 messages. More...
 
virtual void ReceivedMessage (MmMessageVector4 message)
 Handle MmMethod: MessageVector4 Override this to handle Mercury's Vector4 messages. More...
 

Detailed Description

Class to manage a collection of tasks.

Template Parameters
UMust implement IMmTaskInfo
Type Constraints
U :class 
U :IMmTaskInfo 
U :new() 

Member Function Documentation

◆ ApplySequenceID()

virtual void MercuryMessaging.Task.MmTaskManager< U >.ApplySequenceID ( )
virtual

Apply the user-based sequence ID to the associated MmTaskUserConfigurator.

◆ Awake()

override void MercuryMessaging.Task.MmTaskManager< U >.Awake ( )
virtual

Get attached ItaskInfoCollectionLoader, which must be attached to the same game object.

Reimplemented from MercuryMessaging.MmResponder.

◆ GetCurrentTaskResponder()

MmTaskResponder<U> MercuryMessaging.Task.MmTaskManager< U >.GetCurrentTaskResponder ( )

Get current task responder.

Returns
Current task responder

◆ GetNodeAt()

LinkedListNode<U> MercuryMessaging.Task.MmTaskManager< U >.GetNodeAt ( int  index)

Index accessor for LinkedList of task infos.

Parameters
indexValue index.
Returns
If in bounds, LinkedListNode at [index] from start.

◆ GetTaskResponder()

MmTaskResponder<U> MercuryMessaging.Task.MmTaskManager< U >.GetTaskResponder ( MmRelayNode  _mmRelayNode)

Extract a task responder from a given MmRelayNode.

Parameters
_mmRelayNodeMmRelayNode - should share GameObject with a task responder.
Returns
MmTaskResponder, if present on GameObject.

◆ PrepareTasks()

virtual void MercuryMessaging.Task.MmTaskManager< U >.PrepareTasks ( )
virtual

Prepare the tasks that were loaded by the TaskInfoCollectionLoader.

◆ ProceedToFirstTask()

virtual void MercuryMessaging.Task.MmTaskManager< U >.ProceedToFirstTask ( )
virtual

Set the current pointer to the first task in the list.

◆ ProceedToNextTask()

virtual void MercuryMessaging.Task.MmTaskManager< U >.ProceedToNextTask ( )
virtual

Move current task pointer to the next task info. If the instance can, it will attempt to trigger a switch message to move the FSM to the next task state.

◆ ShouldTriggerSwitch()

virtual bool MercuryMessaging.Task.MmTaskManager< U >.ShouldTriggerSwitch ( )
virtual

Base class implementation of ShouldTriggerSwitch always returns true.

Returns
Whether to trigger a switch in the FSM

◆ Start()

override void MercuryMessaging.Task.MmTaskManager< U >.Start ( )
virtual

Prepare the tasks that were loaded.

Reimplemented from MercuryMessaging.MmResponder.

Member Data Documentation

◆ currentTaskInfo

LinkedListNode<U> MercuryMessaging.Task.MmTaskManager< U >.currentTaskInfo
protected

Node of currently selected task.

◆ MmTaskUserData

Contains information of where to load task data, and which tasks to load based on user ID.

◆ SavePartialProgression

bool MercuryMessaging.Task.MmTaskManager< U >.SavePartialProgression = false

Allow task manager to save partial system progression info

◆ TaskInfos

LinkedList<U> MercuryMessaging.Task.MmTaskManager< U >.TaskInfos

The loaded task infos.

◆ TasksNode

This switch node allows you to iterate through a set of tasks using the same mechanisms that allow you to iterate through an FSM of MmResponders.

Property Documentation

◆ CurrentTaskInfo

U MercuryMessaging.Task.MmTaskManager< U >.CurrentTaskInfo
getset

Current task info.

◆ NextTaskInfo

U MercuryMessaging.Task.MmTaskManager< U >.NextTaskInfo
get

Next task info.

◆ PrevTaskInfo

U MercuryMessaging.Task.MmTaskManager< U >.PrevTaskInfo
get

Previous task info.

◆ TaskInfoCollectionLoader

ITaskInfoCollectionLoader<U> MercuryMessaging.Task.MmTaskManager< U >.TaskInfoCollectionLoader
get

Handle to the task info collection loader that is used to load the task collection.

◆ TotalTasksWithCurrentName

int MercuryMessaging.Task.MmTaskManager< U >.TotalTasksWithCurrentName
get

Total number of task infos that have the same name.


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