-
Notifications
You must be signed in to change notification settings - Fork 228
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
Improved docs regarding custom events usage #842
Improved docs regarding custom events usage #842
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add a mention here about that there's no only custom events, there's also default events, ground is one, and there's others. So maybe I would change it and also mention what are the defaults events.
It's a fact that we don't expose the events very well, maybe another PR for the repo
I opted to just add to the existing doc that you can have custom events with an example instead of removing what was there before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a few things, but looking good
src/types.ts
Outdated
* on("talk", (message, posX, posY) => { | ||
* add([text(message), pos(posX, posY - 100)]) | ||
* }) | ||
* onKeyPress("Space", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space in lowercase
@lajbel Addressed feedback and fixed spacing issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good!
Thank you for your contribution to documentation! 🔥 |
In the Kaboom.js docs, it's not clear how to use the
on()
function used to define custom events.I tried to improve the docs to make usage more clear.