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

List of all members.

Public Member Functions

 SpecialEventManager ()
void SetAssetManager (Libraries.AssetManager assetM)
bool AddEvent (BaseSpecialEvent specialEvent)
bool AddDelayedEvent (BaseSpecialEvent specialEvent)
bool CheckEventExists (Libraries.StringType ID)
bool CheckForFlag (Libraries.StringType flag)
BaseSpecialEvent GetEventByID (string eventID)
void RemoveEvent (Libraries.StringType eventID)
void Update (int timePassed)
void Render (Microsoft.Xna.Framework.Graphics.GraphicsDevice device)
void HandleSpecialEventMessageDelegate (object message)
void Clear ()
 SpecialEventManager ()
void SetAssetManager (Libraries.AssetManager assetM)
bool AddEvent (BaseSpecialEvent specialEvent)
bool CheckForFlag (Libraries.StringType flag)
BaseSpecialEvent GetEventByID (string eventID)
void RemoveEvent (Libraries.StringType eventID)
void Update (int timePassed)
void Render (Microsoft.Xna.Framework.Graphics.GraphicsDevice device)
void HandleSpecialEventMessageDelegate (object message)

Protected Member Functions

int GetEventInd (Libraries.StringType eventID)
int GetEventInd (string eventID)
int GetDelayedEventInd (string eventID)
int GetEventInd (Libraries.StringType eventID)
int GetEventInd (string eventID)

Protected Attributes

List< BaseSpecialEventm_events
 Stores the special events currently running.
List< BaseSpecialEventm_delayedEvents

Properties

static SpecialEventManager Instance [get]

Private Attributes

Libraries.AssetManager m_assetM
 Store the asset manager to use.

Static Private Attributes

static SpecialEventManager m_instance
 Singleton instance of the manager.

Detailed Description

Manager that stores and runs special events.


Constructor & Destructor Documentation

TheForum.GameCode.SpecialEvents.SpecialEventManager.SpecialEventManager ( )

Default constructor.

TheForum.GameCode.SpecialEvents.SpecialEventManager.SpecialEventManager ( )

Default constructor.


Member Function Documentation

bool TheForum.GameCode.SpecialEvents.SpecialEventManager.AddDelayedEvent ( BaseSpecialEvent  specialEvent)

Added the given special event. If a event with the same ID already exists, it does not get added. Event is added not immediatly added to the update list. It gets added at the start of the next SpecialEventManager update call. That means it won't update until the next frame. This can be used to store a update while the manager is updating. If the ID is null, then it will be added as a unnamed event.

specialEvent - Event to store.
bool TheForum.GameCode.SpecialEvents.SpecialEventManager.AddEvent ( BaseSpecialEvent  specialEvent)

Add the given special event. If a event with the same ID already exists, it does not get added. If the ID is null, then it will be added as a unnamed event.

bool TheForum.GameCode.SpecialEvents.SpecialEventManager.AddEvent ( BaseSpecialEvent  specialEvent)

Add the given special event. If a event with the same ID already exists, it does not get added. Event is added immediatly to the update list, so this function can't be called while the manager update function is running. If the ID is null, then it will be added as a unnamed event.

specialEvent - Event to store.
bool TheForum.GameCode.SpecialEvents.SpecialEventManager.CheckEventExists ( Libraries.StringType  ID)

Check weither a regular or delayed event with the given ID already exists.

flag - Flag to check for.

Return:
Value is true if a event is found to have the flag, false if not.
bool TheForum.GameCode.SpecialEvents.SpecialEventManager.CheckForFlag ( Libraries.StringType  flag)

Check if any event has the given flag.

flag - Flag to check for.

Return:
Value is true if a event is found to have the flag, false if not.
bool TheForum.GameCode.SpecialEvents.SpecialEventManager.CheckForFlag ( Libraries.StringType  flag)

Check if any event has the given flag.

flag - Flag to check for.

Return:
Value is true if a event is found to have the flag, false if not.
void TheForum.GameCode.SpecialEvents.SpecialEventManager.Clear ( )

Clear up asset allocations in the special events manager.

int TheForum.GameCode.SpecialEvents.SpecialEventManager.GetDelayedEventInd ( string  eventID) [protected]

Get the index the event with the given ID is stored at in the delayed event list.

eventID - ID of the event to get.

Return:
Value is the index the event is at, -1 if no match was found.
BaseSpecialEvent TheForum.GameCode.SpecialEvents.SpecialEventManager.GetEventByID ( string  eventID)

Get the event stored with the given ID

eventID - ID of the event to get.

Return:
Value is the event if a match was found, null if not.
BaseSpecialEvent TheForum.GameCode.SpecialEvents.SpecialEventManager.GetEventByID ( string  eventID)

Get the event stored with the given ID

eventID - ID of the event to get.

Return:
Value is the event if a match was found, null if not.
int TheForum.GameCode.SpecialEvents.SpecialEventManager.GetEventInd ( Libraries.StringType  eventID) [protected]

Get the index the event with the given ID is stored at.

eventID - ID of the event to get.

Return:
Value is the index the event is at, -1 if no match was found.
int TheForum.GameCode.SpecialEvents.SpecialEventManager.GetEventInd ( string  eventID) [protected]

Get the index the event with the given ID is stored at.

eventID - ID of the event to get.

Return:
Value is the index the event is at, -1 if no match was found.
int TheForum.GameCode.SpecialEvents.SpecialEventManager.GetEventInd ( Libraries.StringType  eventID) [protected]

Get the index the event with the given ID is stored at.

eventID - ID of the event to get.

Return:
Value is the index the event is at, -1 if no match was found.
int TheForum.GameCode.SpecialEvents.SpecialEventManager.GetEventInd ( string  eventID) [protected]

Get the index the event with the given ID is stored at.

eventID - ID of the event to get.

Return:
Value is the index the event is at, -1 if no match was found.
void TheForum.GameCode.SpecialEvents.SpecialEventManager.HandleSpecialEventMessageDelegate ( object  message)

Handle a special event message.

device - Device to render with.
void TheForum.GameCode.SpecialEvents.SpecialEventManager.HandleSpecialEventMessageDelegate ( object  message)

Handle a special event message.

device - Device to render with.
void TheForum.GameCode.SpecialEvents.SpecialEventManager.RemoveEvent ( Libraries.StringType  eventID)

Remove the event with the given ID. If no matching ID is found, nothing happens.

eventID - Event to remove.
void TheForum.GameCode.SpecialEvents.SpecialEventManager.RemoveEvent ( Libraries.StringType  eventID)

Remove the event with the given ID. If no matching ID is found, nothing happens.

eventID - Event to remove.
void TheForum.GameCode.SpecialEvents.SpecialEventManager.Render ( Microsoft.Xna.Framework.Graphics.GraphicsDevice  device)

Renders the event.

device - Device to render with.
void TheForum.GameCode.SpecialEvents.SpecialEventManager.Render ( Microsoft.Xna.Framework.Graphics.GraphicsDevice  device)

Renders the event.

device - Device to render with.
void TheForum.GameCode.SpecialEvents.SpecialEventManager.SetAssetManager ( Libraries.AssetManager  assetM)

Store the asset manager to use for special events.

assetM - Asset manager to store.
void TheForum.GameCode.SpecialEvents.SpecialEventManager.SetAssetManager ( Libraries.AssetManager  assetM)

Store the asset manager to use for special events.

void TheForum.GameCode.SpecialEvents.SpecialEventManager.Update ( int  timePassed)

Update the event.

timePassed - How much time to use for the update.
void TheForum.GameCode.SpecialEvents.SpecialEventManager.Update ( int  timePassed)

Update the event.

timePassed - How much time to use for the update.

Member Data Documentation

Store the asset manager to use.

Delayed events are events that doen't get added to the main event list until the start of a update function call. This way events can be added while the manager is updating without breaking the update of events that already exist.

Stores the special events currently running.

Singleton instance of the manager.


Property Documentation

static SpecialEventManager TheForum::GameCode::SpecialEvents.SpecialEventManager::Instance [static, get]

Getter. Retrieve the instance of the singleton version of the class.


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