Skip to content

Instantly share code, notes, and snippets.

@mooman219
Last active January 25, 2021 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mooman219/775fc4ec3c05a0ab8323c9b494eec036 to your computer and use it in GitHub Desktop.
Save mooman219/775fc4ec3c05a0ab8323c9b494eec036 to your computer and use it in GitHub Desktop.
GlobalAnimator.animate(SimpleAnimationInstance, new_value => {
textReveal.minCharacters = new_value;
})
Pseudo code:
GlobalAnimator Animate(SimpleAnimation, lambda) {
Store the (SimpleAnimation, lambda) pair.
}
GlobalAnimator Update() {
Iterate over all (SimpleAnimation, lambda) pairs
For each, run the lambda with lambda(SimpleAnimation.value)
Remove the pair when SimpleAnimation ends
}
C# is lame, just do this
for (int i = list.Count - 1; i >= 0; i--)
{
list.RemoveAt(i);
}
@whatismyusernameicantremember

E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment