C#Code
C#Code
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | Static Private Attributes
TheForum.GameCode.MessageSystems.ItemMessageHandler Class Reference

List of all members.

Public Member Functions

 ItemMessageHandler ()
void AddItemEventCheck (Libraries.StringType eventType, Libraries.Messaging.HandleMessageDelegate delegateToUse)
void RemoveAllEventChecks ()
void ClearMessages ()
void Update (int frames)
void AddMessage (ItemMessage message)
bool CheckForFlag (Libraries.StringType flag)
 ItemMessageHandler ()
void AddItemEventCheck (Libraries.StringType eventType, Libraries.Messaging.HandleMessageDelegate delegateToUse)
void RemoveAllEventChecks ()
void ClearMessages ()
void Update (int frames)
void AddMessage (ItemMessage message)

Protected Member Functions

virtual void ProcessMessage (ItemMessage message)
virtual void ProcessMessages ()
virtual void ProcessMessage (ItemMessage message)
virtual void ProcessMessages ()

Protected Attributes

List< ItemEventCheckm_itemEventsToCheck = new List<ItemEventCheck>()
 Store all the item events to check for.
List< ItemMessagem_itemEventMessages = new List<ItemMessage>()
 Stores messages that have been sent to the handler for future processing.

Properties

static ItemMessageHandler Instance [get]

Static Private Attributes

static ItemMessageHandler m_instance
 Singleton instance.

Detailed Description

The message handler used to detect and store a game related actions that are triggered externally (like input). The game hooks into this and gets messages. The game should not directly get things like input, etc. That should all go through here. The manager will determine what triggers the event depending on the mode. If networkig is being used, it could set highlighter messages to come from there instead of directly from input.


Constructor & Destructor Documentation

TheForum.GameCode.MessageSystems.ItemMessageHandler.ItemMessageHandler ( )

Default constructor.

TheForum.GameCode.MessageSystems.ItemMessageHandler.ItemMessageHandler ( )

Default constructor.


Member Function Documentation

void TheForum.GameCode.MessageSystems.ItemMessageHandler.AddItemEventCheck ( Libraries.StringType  eventType,
Libraries.Messaging.HandleMessageDelegate  delegateToUse 
)

Register for a item event.

eventType - Type of the event.
delegateToUse - Delegate to run when the event type occures.
void TheForum.GameCode.MessageSystems.ItemMessageHandler.AddItemEventCheck ( Libraries.StringType  eventType,
Libraries.Messaging.HandleMessageDelegate  delegateToUse 
)

Register for a item event.

eventType - Type of the event.
delegateToUse - Delegate to run when the event type occures.
void TheForum.GameCode.MessageSystems.ItemMessageHandler.AddMessage ( ItemMessage  message)

Store the given message.

message - Message to store.
void TheForum.GameCode.MessageSystems.ItemMessageHandler.AddMessage ( ItemMessage  message)

Store the given message.

message - Message to store.
bool TheForum.GameCode.MessageSystems.ItemMessageHandler.CheckForFlag ( Libraries.StringType  flag)

Check stored messages for the given flag. Flags can be used to signel that specific events aren't allowed, etc.

flag - Flag to check for.

Return:
Value is true if the flag was found, false if not.
void TheForum.GameCode.MessageSystems.ItemMessageHandler.ClearMessages ( )

Clear the message list.

void TheForum.GameCode.MessageSystems.ItemMessageHandler.ClearMessages ( )

Clear the message list.

virtual void TheForum.GameCode.MessageSystems.ItemMessageHandler.ProcessMessage ( ItemMessage  message) [protected, virtual]

Run through all the registrations and send the message to anybody registered to get it.

message - Message to handle.
virtual void TheForum.GameCode.MessageSystems.ItemMessageHandler.ProcessMessage ( ItemMessage  message) [protected, virtual]

Run through all the registrations and send the message to anybody registered to get it.

message - Message to handle.
virtual void TheForum.GameCode.MessageSystems.ItemMessageHandler.ProcessMessages ( ) [protected, virtual]

Run through all the messages and handle notifing anybody registered for the events.

message - Message to handle.
virtual void TheForum.GameCode.MessageSystems.ItemMessageHandler.ProcessMessages ( ) [protected, virtual]

Run through all the messages and handle notifing anybody registered for the events.

message - Message to handle.
void TheForum.GameCode.MessageSystems.ItemMessageHandler.RemoveAllEventChecks ( )

Remove all event checks.

key - Key to check for.
void TheForum.GameCode.MessageSystems.ItemMessageHandler.RemoveAllEventChecks ( )

Remove all event checks.

key - Key to check for.
void TheForum.GameCode.MessageSystems.ItemMessageHandler.Update ( int  frames)

Update and process any messages that have been stored.

frames - Frames passed since the last update.
void TheForum.GameCode.MessageSystems.ItemMessageHandler.Update ( int  frames)

Update and process any messages that have been stored.

frames - Frames passed since the last update.

Member Data Documentation

Singleton instance.

Stores messages that have been sent to the handler for future processing.

Store all the item events to check for.


Property Documentation

static ItemMessageHandler TheForum::GameCode::MessageSystems.ItemMessageHandler::Instance [static, get]

Singleton instance of the class.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Properties