C# Класс PantheonPrototype.QuestManager

Handles quests as the player accepts, progresses through, and completes them.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
quests List

Открытые методы

Метод Описание
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...

Описание методов

AddQuest() публичный Метод

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.
Результат void

CompleteQuest() публичный Метод

Removes a quest because it is complete.
public CompleteQuest ( Event eventInfo ) : void
eventInfo Event Contains the information on which quest is complete.
Результат void

QuestManager() публичный Метод

public QuestManager ( Pantheon gameReference ) : System
gameReference Pantheon
Результат System

Update() публичный Метод

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
Результат void

Описание свойств

quests публичное свойство

All the quests that the player is currently engaged in.
public List quests
Результат List