C# Class SunsetHigh.Quest

Static class for managing quest triggers (events that set up changes in the game)
显示文件 Open project: ErraticUnicorn/MOSH

Public Properties

Property Type Description
NUM_QUEST_IDS int

Public Methods

Method Description
addQuestState ( QuestID id, QuestState state ) : void

Adds the given state(s) to the quest with the given ID (keeping any old states)

getQuestState ( QuestID id ) : QuestState

Returns the state(s) of the given quests. Check what states are active using bitwise operations (&).

getQuestStateSave ( ) : QuestState[]

Used for saving purposes only

isQuestAccepted ( QuestID id ) : bool
isQuestAvailable ( QuestID id ) : bool
isQuestComplete ( QuestID id ) : bool
isQuestStateActive ( QuestID id, QuestState state ) : bool

Checks a given quest for the given quest state(s)

isQuestStateInactive ( QuestID id, QuestState state ) : bool

Checks a given quest for whether the given state(s) is switched off

loadQuestStateSave ( QuestState loadableTriggers ) : void

Used for loading in quest states when restoring a saved game

overwriteQuestState ( QuestID id, QuestState state ) : void

Sets the quest with the given ID to a given state (overwrites any old states!)

removeQuestState ( QuestID id, QuestState state ) : void

Removes the given state(s) from the quest with the given ID (keeping other states)

setQuestAccepted ( QuestID id ) : void
setQuestAvailable ( QuestID id ) : void
setQuestComplete ( QuestID id ) : void

Private Methods

Method Description
nullCheck ( ) : void
pushEvent ( QuestEventArgs e ) : void

Method Details

addQuestState() public static method

Adds the given state(s) to the quest with the given ID (keeping any old states)
public static addQuestState ( QuestID id, QuestState state ) : void
id QuestID The particular quest
state QuestState The state(s) to add
return void

getQuestState() public static method

Returns the state(s) of the given quests. Check what states are active using bitwise operations (&).
public static getQuestState ( QuestID id ) : QuestState
id QuestID The particular quest
return QuestState

getQuestStateSave() public static method

Used for saving purposes only
public static getQuestStateSave ( ) : QuestState[]
return QuestState[]

isQuestAccepted() public static method

public static isQuestAccepted ( QuestID id ) : bool
id QuestID
return bool

isQuestAvailable() public static method

public static isQuestAvailable ( QuestID id ) : bool
id QuestID
return bool

isQuestComplete() public static method

public static isQuestComplete ( QuestID id ) : bool
id QuestID
return bool

isQuestStateActive() public static method

Checks a given quest for the given quest state(s)
public static isQuestStateActive ( QuestID id, QuestState state ) : bool
id QuestID The particular quest
state QuestState The quest state(s) to check
return bool

isQuestStateInactive() public static method

Checks a given quest for whether the given state(s) is switched off
public static isQuestStateInactive ( QuestID id, QuestState state ) : bool
id QuestID The particular quest
state QuestState The quest state(s) to check
return bool

loadQuestStateSave() public static method

Used for loading in quest states when restoring a saved game
public static loadQuestStateSave ( QuestState loadableTriggers ) : void
loadableTriggers QuestState A QuestState[] representation of the states to load
return void

overwriteQuestState() public static method

Sets the quest with the given ID to a given state (overwrites any old states!)
public static overwriteQuestState ( QuestID id, QuestState state ) : void
id QuestID The particular quest
state QuestState The new state(s) of the quest
return void

removeQuestState() public static method

Removes the given state(s) from the quest with the given ID (keeping other states)
public static removeQuestState ( QuestID id, QuestState state ) : void
id QuestID The particular quest
state QuestState The state(s) to remove
return void

setQuestAccepted() public static method

public static setQuestAccepted ( QuestID id ) : void
id QuestID
return void

setQuestAvailable() public static method

public static setQuestAvailable ( QuestID id ) : void
id QuestID
return void

setQuestComplete() public static method

public static setQuestComplete ( QuestID id ) : void
id QuestID
return void

Property Details

NUM_QUEST_IDS public_oe static_oe property

public static int NUM_QUEST_IDS
return int