diff --git a/index.html b/index.html index 564c99c..8ef61cb 100644 --- a/index.html +++ b/index.html @@ -42,7 +42,7 @@ your projects.

hump.gamestate^top

Gamestate = require "hump.gamestate"
 
-

A gamestate encapsulates independent data an behaviour in a single table.

+

A gamestate encapsulates independent data and behaviour in a single table.

A typical game could consist of a menu-state, a level-state and a game-over-state.

@@ -80,7 +80,7 @@ function love.load() end

Module overview

Callbacks
Gamestate Callbacks.
new()
Create a new gamestate.
switch()
Switch to gamestate.
current()
Get current gamestate.
push()
Push state on top of the stack.
pop()
Pops state from the stack.
<callback>()
Call function on active gamestate.
registerEvents()
Automatically do all of the above when needed.

Callbacks ^top

A gamestate can define all callbacks that LÖVE defines. In addition, there are -callbacks for initalizing, entering and leaving a state:

+callbacks for initializing, entering and leaving a state:

init()
@@ -90,7 +90,7 @@ callbacks for initalizing, entering and leaving a state:

Called when re-entering a state by pop()ing another state.
update()
Update the game state. Called every frame.
draw()
Draw on the screen. Called every frame.
focus()
-
Called if the window gets or looses focus.
keypressed()
+
Called if the window gets or loses focus.
keypressed()
Triggered when a key is pressed.
keyreleased()
Triggered when a key is released.
mousepressed()
Triggered when a mouse button is pressed.
mousereleased()
@@ -101,7 +101,7 @@ callbacks for initalizing, entering and leaving a state:

When using registerEvents(), all these callbacks will be called by the corresponding LÖVE callbacks and receive -receive the same arguments (e.g. state:update(dt) will be called by +the same arguments (e.g. state:update(dt) will be called by love.update(dt)).

Example:

@@ -336,7 +336,7 @@ end global/default timer (see examples).

Creates a new timer instance that is independent of the global timer: It will -manage it's own list of scheduled functions and does not in any way affect the +manage its own list of scheduled functions and does not in any way affect the the global timer. Likewise, the global timer does not affect timer instances.

Parameters:
None
Returns:
Timer
@@ -1521,7 +1521,7 @@ end global/default registry (see examples).

Creates a new signal registry that is independent of the default registry: It -will manage it's own list of signals and does not in any way affect the the +will manage its own list of signals and does not in any way affect the the global registry. Likewise, the global registry does not affect the instance.

Parameters:
None
Returns:
Registry
@@ -1596,7 +1596,7 @@ end

A camera utility for LÖVE. A camera can "look" at a position. It can zoom in -and out and it can rotate it's view. In the background, this is done by +and out and it can rotate its view. In the background, this is done by actually moving, scaling and rotating everything in the game world. But don't worry about that.