PowerQuest 0.19.0
|
Global Script: The home for your game specific logic.
Globals.
(eg: Globals.m_myCoolInteger
)Inherits GlobalScriptBase< GlobalScript >.
Public Types | |
enum | eProgress { None , GotWater , DrankWater , WonGame } |
Just an example of using an enum for game state. This can be accessed from other scripts, eg: if ( E.Is(eProgress.DrankWater) )... More... | |
Public Member Functions | |
void | OnGameStart () |
Called when game first starts. | |
void | OnPostRestore (int version) |
Called after restoring a game. Use this if you need to update any references based on saved data. | |
void | OnEnterRoom () |
Blocking script called whenever you enter a room, before fading in. Non-blocking functions only. | |
IEnumerator | OnEnterRoomAfterFade () |
Blocking script called whenever you enter a room, after fade in is complete. | |
IEnumerator | OnExitRoom (IRoom oldRoom, IRoom newRoom) |
Blocking script called whenever you exit a room, as it fades out. | |
IEnumerator | UpdateBlocking () |
Blocking script called every frame when nothing's blocking, you can call blocking functions in here that you'd like to occur anywhere in the game. | |
void | Update () |
Called every frame. Non-blocking functions only. | |
void | UpdateNoPause () |
Called every frame, even when paused. Non-blocking functions only. | |
IEnumerator | OnAnyClick () |
Blocking script called whenever the player clicks anywwere. This function is called before any other click interaction. If this function blocks, it will stop any other interaction from happening. | |
IEnumerator | OnWalkTo () |
Blocking script called whenever the player tries to walk somewhere. Even if C.Player.Moveable is set to false. | |
void | OnMouseClick (bool leftClick, bool rightClick) |
Called when the mouse is clicked in the game screen. Use this to customise your game interface by calling E.ProcessClick() with the verb that should be used. By default this is set up for a 2 click interface. | |
IEnumerator | UnhandledInteract (IQuestClickable mouseOver) |
Called when player interacted with something that had not specific "interact" script. | |
IEnumerator | UnhandledLookAt (IQuestClickable mouseOver) |
Called when player looked at something that had not specific "Look at" script. | |
IEnumerator | UnhandledUseInvInv (Inventory invA, Inventory invB) |
Called when player used one inventory item on another that doesn't have a response. | |
IEnumerator | UnhandledUseInv (IQuestClickable mouseOver, Inventory item) |
Called when player used inventory on something that didn't have a response. | |
Public Attributes | |
eProgress | m_progressExample = eProgress.None |
bool | m_spokeToBarney = false |
Just an example of using a global variable that can be accessed in any room with Globals.m_spokeToBarney . All variables like this in Quest Scripts are automatically saved. | |
enum eProgress |
Just an example of using an enum for game state. This can be accessed from other scripts, eg: if ( E.Is(eProgress.DrankWater) )...
bool m_spokeToBarney = false |
Just an example of using a global variable that can be accessed in any room with Globals.m_spokeToBarney
. All variables like this in Quest Scripts are automatically saved.
|
inline |
Called when game first starts.
|
inline |
Called after restoring a game. Use this if you need to update any references based on saved data.
|
inline |
Blocking script called whenever you enter a room, before fading in. Non-blocking functions only.
|
inline |
Blocking script called whenever you enter a room, after fade in is complete.
Blocking script called whenever you exit a room, as it fades out.
|
inline |
Blocking script called every frame when nothing's blocking, you can call blocking functions in here that you'd like to occur anywhere in the game.
|
inline |
Called every frame. Non-blocking functions only.
|
inline |
Called every frame, even when paused. Non-blocking functions only.
|
inline |
Blocking script called whenever the player clicks anywwere. This function is called before any other click interaction. If this function blocks, it will stop any other interaction from happening.
|
inline |
Blocking script called whenever the player tries to walk somewhere. Even if C.Player.Moveable
is set to false.
|
inline |
Called when the mouse is clicked in the game screen. Use this to customise your game interface by calling E.ProcessClick() with the verb that should be used. By default this is set up for a 2 click interface.
|
inline |
Called when player interacted with something that had not specific "interact" script.
|
inline |
Called when player looked at something that had not specific "Look at" script.
|
inline |
Called when player used one inventory item on another that doesn't have a response.
|
inline |
Called when player used inventory on something that didn't have a response.