C# Class PantheonPrototype.Objective

Contains the individual logic for deciding if a condition has been met based on game events.
Exibir arquivo Open project: Bacon41/PantheonPrototype

Public Properties

Property Type Description
nextObjectives List

Protected Properties

Property Type Description
state condition

Public Methods

Method Description
Complete ( ) : bool

Determines if an objective is complete.

HandleNotification ( Event eventinfo ) : void

An event handler meant to be registered with the event manager.

Initialize ( Pantheon gameReference ) : void

Sets the objective to a starting state. This way, an objective may be predictable when reused. Notably registers event handlers.

Objective ( int id ) : System

Constructor... yeah

Update ( GameTime gameTime ) : void

Used for time sensitive objectives.

WrapUp ( Pantheon gameReference ) : void

Called after the objective has been completed. Performs any transition events before the quest moves to the next objective. Notably cleans up registered event handlers.

Method Details

Complete() public method

Determines if an objective is complete.
public Complete ( ) : bool
return bool

HandleNotification() public method

An event handler meant to be registered with the event manager.
public HandleNotification ( Event eventinfo ) : void
eventinfo Event The event data passed to the handler
return void

Initialize() public method

Sets the objective to a starting state. This way, an objective may be predictable when reused. Notably registers event handlers.
public Initialize ( Pantheon gameReference ) : void
gameReference Pantheon A reference to the game so that the event /// manager is accessible. Also, other initializing actions may be taken.
return void

Objective() public method

Constructor... yeah
public Objective ( int id ) : System
id int
return System

Update() public method

Used for time sensitive objectives.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Time since the last update cycle.
return void

WrapUp() public method

Called after the objective has been completed. Performs any transition events before the quest moves to the next objective. Notably cleans up registered event handlers.
public WrapUp ( Pantheon gameReference ) : void
gameReference Pantheon
return void

Property Details

nextObjectives public_oe property

A list of objectives which should activate when this one is finished.
public List nextObjectives
return List

state protected_oe property

protected condition state
return condition