diff --git a/index.html b/index.html index 3e9850e..e9ee4c4 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,8 @@ ul.nav li { display:inline; margin-right: 1em; } a.top { font-size: 8pt; margin-left: 1em; float: right; } + a.source { border-radius: 5px; -moz-border-radius: 5px; font-weight:bold; float:right; border:1px solid #777; padding: 2px 4px 2px 4px; background: #e4e4e4; text-decoration:none; font-size: 9pt;} + a.source:hover { background: #eee; border-color: #aaa; color: #555;} .doc { padding-left: 1em; margin-bottom: 1em; border-left: 1px dotted #aaa; } .function { display:block; font-weight:bold; font-family: fixed; background: #f9f9f9; border:1px solid #ddd; margin-left: -1em; } @@ -106,6 +108,7 @@ module by clicking these:

vector.lua^ top

+ view source

A vector class implementing everything you want to do with vectors, and some more.

Overview (click item for more details): @@ -260,6 +263,7 @@ print(a:dist(b)) -- prints 1.4142135623731

class.lua^ top

+ view source

class.lua provides a simple and easy to use class system. Albeit it's limitations, class.lua offers multiple inheritance and minimal reflection capabilities. Note that only methods will be inherited @@ -388,6 +392,7 @@ result:foo() -- error: method does not exist

camera.lua^ top

+ view source Depends on vector.lua

Camera object to display only a partial region of the game world. The region can be zoomed and rotated. You can transform camera coordinates to world coordinated @@ -428,6 +433,10 @@ result:foo() -- error: method does not exist

function camera:translate(t)^ top Translate (move) camera by vector t. Same as camera.pos = camera.pos + t. +
+ + +
Parameters:[vector]t:Translation vector

@@ -460,6 +469,12 @@ camera:deapply()
function camera:transform(p)^ top Transform vector p from camera coordinates to world coordinates. You probably won't need this, but it is the basis to camera:mousepos(). + + + + + +
Parameters:[vector]p:Vector to transform to world coordinates
Returns:[vector] transformed vector.
@@ -467,16 +482,20 @@ camera:deapply() Get mouse position in world coordinates, i.e. the position the users mouse is currently pointing at when camera transformations are applied. Use this for any mouse interaction with transformed objects in your game. + + +
Returns:[vector] Mouse position in world coordinates.

gamestate.lua^ top

+ view source -

Useful to separate different states of your game (hence "gamestate") like title screens, +

Useful to separate different states of your game (hence "gamestate") like title screens, level loading, main game, etc. Each gamestate can have it's own update(), draw(), - keyreleased(), keypressed() and mousereleased() which correspond + keyreleased(), keypressed() and mousereleased() which correspond to the ones defined in love. See the callback list for more details.

Additionally, each gamestate can define a enter(pre, ...) and leave() function, @@ -544,8 +563,8 @@ camera:deapply()

function Gamestate.registerEvents()^ top - Registers all above events so you don't need to call then in your love.* routines. -

It is an error to call this anywhere else than love.load(), since it overwrites the + Registers all above events so you don't need to call then in your love.* routines. +

It is an error to call this anywhere else than love.load(), since it overwrites the callbacks. Dont worry though, your callbacks will still be executed.

@@ -574,6 +593,7 @@ camera:deapply()

ringbuffer.lua^ top

+ view source

A circular container that can hold arbitrary items. It can be used to create Tomb Raider style inventories, a looping music playlist, recurring dialog sequences and much more.

@@ -688,7 +708,8 @@ rb:removeAt(-1) -- rb = { 2 ,4,5}, rb:get() == 2
-

sequence.lua^ top

+

sequence.lua^ top

+ view source Depends on ringbuffer.lua

sequence.lua offers basic support for automated switching of Scenes. You can use it to add intros and cutscenes to your games.

@@ -708,7 +729,7 @@ rb:removeAt(-1) -- rb = { 2 ,4,5}, rb:get() == 2 Scene(length)New scene object scene:isFinished()Indicate end of scene

-

A Scene defines three callback functions. Do not try to +

A Scene defines three callback functions. Do not try to access them yourself. Let Sequence do the job: @@ -789,7 +810,7 @@ rb:removeAt(-1) -- rb = { 2 ,4,5}, rb:get() == 2function Scene(length)^ top Create a new scene of length length
scene:draw():Draw contents on screen (mandatory)
- +
Parameters: [optional]length
Parameters: [optional]length Length of scene. If < 0 scene will never finish. Defaults to -1
Returns: New scene object
@@ -901,15 +922,14 @@ end

Download^ top

-

You can download this project in either +

You can view and download the individual modules on github: vrld/hump. +You may also download the whole packed sourcecode either in zip or tar formats.

-

You can also clone the project with Git by running: -

$ git clone git://github.com/vrld/hump

- - +

You can clone the project with Git by running: +

git clone git://github.com/vrld/hump
+Once done, tou can check for updates by running +
git pull