-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👼 Added doc for callbacks and races.
The angelscript documentation is now divided into 3 pseudo-modules: Game-to-script ^AngelScript^ Documents script functions (callbacks) invoked by the game. Script-to-game ^AngelScript^ Documents game functions which scripts can invoke to control it. Script-to-script ^AngelScript^ Documents built-in scripts.
- Loading branch information
Showing
11 changed files
with
166 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
namespace Game2Script { | ||
|
||
/** \addtogroup ScriptSideAPIs | ||
* @{ | ||
*/ | ||
|
||
/** \addtogroup Game2Script | ||
* @{ | ||
*/ | ||
|
||
/** Required; Script setup function - invoked once when script is loaded. | ||
* If not present, the game will report error and abandon the script. | ||
*/ | ||
void main(); | ||
|
||
/** Optional; Script update function - invoked once every rendered frame. | ||
* @param dt Elapsed time (delta time) in seconds. | ||
*/ | ||
void frameStep(float dt); | ||
|
||
/** Optional; Invoked if a registered event is triggered, see Script2Game::game::registerForEvent. | ||
* @param event Event code. | ||
* @param param Event-specific parameter, see docs for the event codes. | ||
*/ | ||
void eventCallback(Script2Game::scriptEvents event, int param); | ||
|
||
/** Optional; Invoked when a vehicle touches an eventbox which has no custom handler function. | ||
* @param trigger_type Unused, always 0. | ||
* @param inst Unique ID of the terrain object instance which created the eventbox. | ||
* @param box Name of the eventbox as defined by the terrain object's ODEF file. | ||
* @param nodeid Number of the node which triggered the event, or -1 if not known. | ||
*/ | ||
void defaultEventCallback(int trigger_type, string inst, string box, int nodeid); | ||
|
||
/** @}*/ //addtogroup Game2Script | ||
/** @}*/ //addtogroup ScriptSideAPIs | ||
|
||
} // namespace Game2Script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
/// @defgroup ScriptSideAPIs Script-side APIs | ||
/// ^AngelScript^ All features provided to/offered by scripting. | ||
|
||
/// @defgroup Game2Script Game-to-script | ||
/// ^AngelScript^ Documents script functions (callbacks) invoked by the game. | ||
/// @{ | ||
|
||
/// @brief Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation. | ||
namespace Game2Script {} | ||
|
||
/// @} | ||
|
||
/// @defgroup Script2Game Script-to-game | ||
/// ^AngelScript^ Documents game functions which scripts can invoke to control it. | ||
/// @{ | ||
|
||
/// @brief Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation. | ||
namespace Script2Game {} | ||
|
||
/// @} | ||
|
||
/// @defgroup Script2Script Script-to-script | ||
/// ^AngelScript^ Documents built-in scripts. | ||
/// @{ | ||
|
||
/// @brief Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation. | ||
namespace Script2Script {} | ||
|
||
/// @} |