Skip to content

Commit

Permalink
doc formatting typos
Browse files Browse the repository at this point in the history
  • Loading branch information
aviks committed Oct 29, 2020
1 parent 2c00299 commit 938cc41
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,14 @@ In other words, you can define one of:

`function on_key_down(g, key, keymod) .... end`


For a constant input, such as for movement, you can check for keypress within the `update` function, via the `keyboard` attribute of the game object (`g.keyboard`).

## Mouse input
Mouse movement can be tracked defining the `on_mouse_move` function in your game. The inputs to the function should be the `Game` object, and the mouse position as a tuple of numbers. For mouse clicks, use the `on_mouse_down` function, which takes as input the `Game` object, position, and the button.

`function on_mouse_move(g::Game, pos)`
`function on_mouse_move(g::Game, pos) .... end`

`function on_mouse_down(g::Game, pos, button)`
`function on_mouse_down(g::Game, pos, button) .... end`

## Playing sounds
To play sound effects, you can call the `play_sound` function. To play music on a loop, call the `play_music` function. Both these functions can take `.wav`, `.mp3` and `.ogg` files.
Expand Down

2 comments on commit 938cc41

@aviks
Copy link
Owner Author

@aviks aviks commented on 938cc41 Oct 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/23872

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.3 -m "<description of version>" 938cc41b34f8ffd9c453ddb9fcd3da8ea67adf4a
git push origin v0.1.3

Please sign in to comment.