C# Class PantheonPrototype.QuestManager

Handles quests as the player accepts, progresses through, and completes them.
Show file Open project: Bacon41/PantheonPrototype Class Usage Examples

Public Properties

Property Type Description
quests List

Public Methods

Method Description
AddQuest ( Event eventInfo ) : void

Designed to pick up an event creation event and parse it to create a quest. The event type is specifically the CreateQuest event... and it's getting rather specific in format... so I should document it. Create Quest event has a payload populated by a bunch of objective declaration pairs. Each objective has a key such as "Objective1" or such. The actual information shall be in one string and shall be parsed on this side of the event. The information shall be divided by a semi-colon. The information shall be contained in the following order: * Objective Id (index) * Type (Trigger, Speak, Kill) * Target (most objectives require a target string for the constructor) * Next Objective(s) (list of numeric ids separated by commas) * Objective Title * Objective Text In addition to the objectives, the payload shall contain a meta-information pair. This shall be labelled as QuestInfo. The information in QuestInfo is as follows (divided by semi-colon): * Number of Objectives * Number(s) of the First Objective(s) (list separated by commas) * Quest Title

CompleteQuest ( Event eventInfo ) : void

Removes a quest because it is complete.

QuestManager ( Pantheon gameReference ) : System
Update ( GameTime gameTime, Pantheon gameReference ) : void

Updates any time sensitive events in quests. Most of the quest updating should occur through the notify function. This is only for quests that have a timer built in or maybe to change AI states etc...

Method Details

AddQuest() public method

Designed to pick up an event creation event and parse it to create a quest. The event type is specifically the CreateQuest event... and it's getting rather specific in format... so I should document it. Create Quest event has a payload populated by a bunch of objective declaration pairs. Each objective has a key such as "Objective1" or such. The actual information shall be in one string and shall be parsed on this side of the event. The information shall be divided by a semi-colon. The information shall be contained in the following order: * Objective Id (index) * Type (Trigger, Speak, Kill) * Target (most objectives require a target string for the constructor) * Next Objective(s) (list of numeric ids separated by commas) * Objective Title * Objective Text In addition to the objectives, the payload shall contain a meta-information pair. This shall be labelled as QuestInfo. The information in QuestInfo is as follows (divided by semi-colon): * Number of Objectives * Number(s) of the First Objective(s) (list separated by commas) * Quest Title
public AddQuest ( Event eventInfo ) : void
eventInfo Event The event information containing quest information.
return void

CompleteQuest() public method

Removes a quest because it is complete.
public CompleteQuest ( Event eventInfo ) : void
eventInfo Event Contains the information on which quest is complete.
return void

QuestManager() public method

public QuestManager ( Pantheon gameReference ) : System
gameReference Pantheon
return System

Update() public method

Updates any time sensitive events in quests. Most of the quest updating should occur through the notify function. This is only for quests that have a timer built in or maybe to change AI states etc...
public Update ( GameTime gameTime, Pantheon gameReference ) : void
gameTime Microsoft.Xna.Framework.GameTime Time since the last update cycle.
gameReference Pantheon
return void

Property Details

quests public property

All the quests that the player is currently engaged in.
public List quests
return List