Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
hpl3:game:guides:scripters_guide [2014/10/01 13:14] thomas [Code Structure] |
hpl3:game:guides:scripters_guide [2014/11/11 20:39] thomas [Code Structure] |
||
---|---|---|---|
Line 76: | Line 76: | ||
class cScrMap : iScrMap | class cScrMap : iScrMap | ||
{ | { | ||
- | //-------------------------------------------- | + | //-------------------------------------------- |
- | ////////////////////////////////////////////////////////////////////////////////////////// | + | ////////////////////////////////////////////////////////////////////////////////////////// |
- | // ============== | + | // ============== |
- | // MAIN CALLBACKS | + | // MAIN CALLBACKS |
- | // ============== | + | // ============== |
- | //{/////////////////////////////////////////////////////////////////////////////////////// | + | //{/////////////////////////////////////////////////////////////////////////////////////// |
- | //------------------------------------------------------- | + | //------------------------------------------------------- |
- | /*OnStart, OnEnter, OnLeave, Update (avoid this), OnAction (debug only), OnPlayerDead, etc are here.*/ | + | /*OnStart, OnEnter, OnLeave, Update (avoid this), OnAction (debug only), OnPlayerDead, etc are here.*/ |
- | //------------------------------------------------------- | + | //------------------------------------------------------- |
- | + | ||
- | //} END MAIN CALLBACKS | + | |
- | | + | |
- | ////////////////////////////////////////////////////////////////////////////////////////// | + | //} END MAIN CALLBACKS |
- | // ============== | + | |
- | // MAIN FUNCTIONS | + | |
- | // ============== | + | |
- | //{/////////////////////////////////////////////////////////////////////////////////////// | + | |
- | //------------------------------------------------------- | + | ////////////////////////////////////////////////////////////////////////////////////////// |
+ | // ============== | ||
+ | // MAIN FUNCTIONS | ||
+ | // ============== | ||
+ | //{/////////////////////////////////////////////////////////////////////////////////////// | ||
- | /*Put any variables that are used in more than one scene here.*/ | + | //------------------------------------------------------- |
- | //------------------------------------------------------- | + | /*Put any variables that are used in more than one scene here.*/ |
- | /*Put any functions that are used in more than one scene here.*/ | + | //------------------------------------------------------- |
- | //------------------------------------------------------- | + | /*Put any functions that are used in more than one scene here.*/ |
- | + | ||
- | //} END MAIN FUNCTIONS | + | |
- | + | ||
- | ////////////////////////////////////////////////////////////////////////////////////////// | + | |
- | // ============== | + | |
- | // SCENE X *NAME OF SCENE* | + | |
- | // ============== | + | |
- | //{////////////////////////////////////////////////////////////////////////////////////// | + | |
- | //------------------------------------------------------- | + | //------------------------------------------------------- |
- | /*Put any variables that are used by many events in Scene X here.*/ | + | //} END MAIN FUNCTIONS |
- | //------------------------------------------------------- | + | ////////////////////////////////////////////////////////////////////////////////////////// |
+ | // ============== | ||
+ | // SCENE X *NAME OF SCENE* | ||
+ | // ============== | ||
+ | //{////////////////////////////////////////////////////////////////////////////////////// | ||
- | /*Put any functions that are used in more than one event in Scene X here.*/ | + | //------------------------------------------------------- |
- | //------------------------------------------------------- | + | /*Put any variables that are used by many events in Scene X here.*/ |
- | + | ||
- | + | ||
- | ///////////////////////////////////////// | + | |
- | // Scene X Event X *Name Of Event* | + | |
- | //{////////////////////////////////////// | + | |
- | //------------------------------------------------------- | + | //------------------------------------------------------- |
- | /*Put any variables that are only used in Scene X, Event X here.*/ | + | /*Put any functions that are used in more than one event in Scene X here.*/ |
- | //------------------------------------------------------- | + | //------------------------------------------------------- |
- | /*Put any functionsthat are only used in Scene X, Event X here.*/ | + | ///////////////////////////////////////// |
+ | // Scene X Event X *Name Of Event* | ||
+ | //{////////////////////////////////////// | ||
- | //------------------------------------------------------- | + | //------------------------------------------------------- |
- | + | ||
- | //} END Scene X Event X | + | |
- | + | ||
- | //} END SCENE X | + | |
- | + | /*Put any variables that are only used in Scene X, Event X here.*/ | |
- | ///////////////////////////////////////// | + | |
- | // ============== | + | |
- | // TERMINALS | + | |
- | // ============== | + | |
- | ///////////////////////////////////////// | + | |
- | //------------------------------------------------------- | + | //------------------------------------------------------- |
- | ///////////////////////////////////////// | + | /*Put any functionsthat are only used in Scene X, Event X here.*/ |
- | // Terminal *Name Of Terminal* | + | |
- | //{////////////////////////////////////// | + | |
- | //------------------------------------------------------- | + | //------------------------------------------------------- |
- | /*Put any variables that are only used Terminal here.*/ | + | //} END Scene X Event X |
- | //------------------------------------------------------- | + | //} END SCENE X |
- | /*Put any functions that are only used Terminal here.*/ | + | ///////////////////////////////////////// |
+ | // ============== | ||
+ | // TERMINALS | ||
+ | // ============== | ||
+ | //{////////////////////////////////////// | ||
- | //------------------------------------------------------- | + | //------------------------------------------------------- |
- | + | ||
- | //} END Terminal *Name Of Terminal* | + | ///////////////////////////////////////// |
+ | // Terminal *Name Of Terminal* | ||
+ | //{////////////////////////////////////// | ||
+ | |||
+ | //------------------------------------------------------- | ||
+ | |||
+ | /*Put any variables that are only used Terminal here.*/ | ||
+ | |||
+ | //------------------------------------------------------- | ||
+ | |||
+ | /*Put any functions that are only used Terminal here.*/ | ||
+ | |||
+ | //------------------------------------------------------- | ||
+ | |||
+ | //} END Terminal *Name Of Terminal* | ||
+ | |||
+ | //} END TERMINALS | ||
} | } | ||
Line 195: | Line 194: | ||
} | } | ||
</code> | </code> | ||
+ | |||
==== Naming Conventions ==== | ==== Naming Conventions ==== | ||