We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently in Snake I'm doing something like:
var firstMove = true level.snake.onMoved = { if (firstMove) { firstMove = false addTimer(KonsoleAnim.ONE_FRAME_60FPS, repeat = true) { ... } } }
which could possibly be simplified to:
level.snake.onMoved = { addTimer(KonsoleAnim.ONE_FRAME_60FPS, repeat = true, key = level.snake) { ... } }
In other words, if a timer with the particular key is already found, don't add it again.
The text was updated successfully, but these errors were encountered:
It's way fewer lines, which is nice, so we should probably do it. But there's a workaround so it's not urgent.
Sorry, something went wrong.
6faf241
Done. KonsoleAnim also benefted from the feature.
Allow addTimer to take a key value for uniqueness
f54f4e1
Fixes #48
No branches or pull requests
Currently in Snake I'm doing something like:
which could possibly be simplified to:
In other words, if a timer with the particular key is already found, don't add it again.
The text was updated successfully, but these errors were encountered: