14 years
edited 8 years
1 library Init /* v1.0.0.0
2 ************************************************************************************3 *4 * module Init5 *6 * interface private static method init takes nothing returns nothing7 * - Runs at map init8 *9 *************************************************************************************10 *11 * module InitTimer12 *13 * interface private static method init takes nothing returns nothing14 * - Runs after a one-shot timer with a period of 015 *16 ************************************************************************************/17 module Init18 static if thistype.init.exists then
19 private static method onInit takes nothing returns nothing
20 call init()
21 endmethod22 endif23 endmodule24
25 module InitTimer26 static if thistype.init.exists then
27 private static method initex takes nothing returns nothing
28 call DestroyTimer(GetExpiredTimer())
29 call init()
30 endmethod31 private static method onInit takes nothing returns nothing
32 call TimerStart(CreateTimer(), 0, false, function thistype.initex)
33 endmethod34 endif35 endmodule36 endlibrary