Trait livesplit_wrapper::Splitter
source · [−]Expand description
The main autosplitter trait.
This trait is the entry point for the autosplitter’s functionality. The
new and update functions are hooks that will be called by LiveSplit. To
interact with LiveSplit’s timer, use the functions defined in
HostFunctions.
HostFunctions is automatically implemented on Splitters, so in your
update function you can call methods like
self.split() and
self.set_game_time().
REMEMBER!
Make sure you use the register_autosplitter! macro on your splitter!
Without it, your wasm library won’t expose the proper functions and it’ll
fail to load.
Required Methods
Called when the LiveSplit runtime instantiates your splitter. It’s a good time to attach to a game process, set initial variables, or change your tick rate. Note that this won’t be called every time the run is reset.
Called periodically by the LiveSplit runtime. To change the rate that
it’s called, use set_tick_rate
