-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timer sequence #2391
base: develop
Are you sure you want to change the base?
timer sequence #2391
Conversation
qol class for a making batches of flxtimers, so you can do stuff like ```haxe new Sequence([ {time: 1, callback: some_func}, {time: 2.5, callback: function() { some_var = true; }} ], Conductor.beatLengthMs / 1000); ```
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 |
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... |
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 |
fix potential null access when the last timer is removed and changed to iterate through the whole array to support event lists that arent in ascending order (iterating in reverse so in-place array modification via `remove` doesnt mess anything up)
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. |
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 |
qol class for a making batches of flxtimers, so you can do stuff like