Funkin
Funkin copied to clipboard
timer sequence
qol class for a making batches of flxtimers, so you can do stuff like
new Sequence([
{time: 1, callback: some_func},
{time: 2.5, callback: () -> {
some_var = true;
}}
], Conductor.beatLengthMs / 1000);
instead of
new FlxTimer().start(1 * (Conductor.beatLengthMs / 1000), some_func);
new FlxTimer().start(2.5 * (Conductor.beatLengthMs / 1000), () -> {
some_var = true;
});
im unsure if a pr is the right place for a feature request... but posting all that code into a feature request issue feels unfit sorry if im going about this the wrong way lol
Oh wait instead of it depend on deltatimes, why not also make it for conductor songPosition too
(This sounds much for a feature actually and there prob already a equivalent that is events)
Oh wait instead of it depend on deltatimes, why not also make it for conductor songPosition too
(This sounds much for a feature actually and there prob already a equivalent that is events)
doesnt have to be used in just playstate tho... but ill try looking for a way to make it optionally follow song pos, or just pause/resume/stop when the song pauses/resumes/stops
Maybe you want to use it everywhere, not only inside songs
Could add an option or make a variant that uses Conductor.instance.songPosition then
i believe this should do it? do tell me if any of you find potential errors
...except the one fixed below lol
this looks lovely, maybe can even be in base Flixel code ! gonna poke @Geokureli to see if this might be cool, otherwise I'll mark this as reviewing internally!
Going to suspend this and wait to see if it gets merged into Flixel.
Going to suspend this and wait to see if it gets merged into Flixel.
I don't plan on adding this in the immediate future, and if I did I'm considering something less adhoc
If people want this feature now they can borrow this implementation, which seems good, for now