Jesus4Lyf
Good Idea™
- Reaction score
- 397
>don't even talk about auto-recycling or something...
You mean this?
Oops.
You mean this?
JASS:
module Magic
private static method callThing takes Args X returns nothing
call thistype.onCommand(X)
call X.destroy() // OMG autodestroy.
endmethod
private static method onInit takes nothing returns nothing
call YourSysInitializerThingie(thistype.callThing) // use function interface, call with .execute when event fires, passing Args.
endmethod
endmodule
struct MyStruct extends array
private method onCommand takes Args args returns nothing
call TriggerSleepAction(1.0)
call DoThingsAndStillWorkAndAutomaticallyDestroyLaterAsWell(args)
endmethod
implement CallThing // must be below your onCommand method.
endstruct
Oops.