mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
Add accessor descriptions
This commit is contained in:
parent
8275232b5f
commit
6664a4e9a4
29
index.html
29
index.html
@ -43,6 +43,7 @@
|
||||
.functionlist { border-left: 1px dotted #aaa; margin: -.6em 0 0 2em; }
|
||||
.functionlist a { text-decoration: none; font-weight:bold; color: #506060; }
|
||||
.functionlist a:hover { color: black; }
|
||||
.functionlist td em { font-size: .8em; font-weight:bold;width:7em; display:inline-block; }
|
||||
|
||||
td, th { vertical-align: top; }
|
||||
.doc table { margin-top: 5px; }
|
||||
@ -109,8 +110,14 @@ module by clicking these:
|
||||
<a name="vector.lua"></a>
|
||||
<h3>vector.lua<a class="top" href="#doc">^ top</a></h3>
|
||||
<a href="http://github.com/vrld/hump/blob/master/vector.lua" class="source">view source</a>
|
||||
<p>A vector class implementing everything you want to do with vectors, and some more.</p>
|
||||
<p>Overview (click item for more details):
|
||||
<p>A vector class implementing nearly everything you want to do with vectors, and some more.</p>
|
||||
<p>Accessors:
|
||||
<table class="functionlist">
|
||||
<tr><td><em>[number]</em> <code>vector.x</code></td><td><code>x</code>-coordinate of the vector</td></tr>
|
||||
<tr><td><em>[number]</em> <code>vector.y</code></td><td><code>y</code>-coordinate of the vector</td></tr>
|
||||
</table>
|
||||
</p>
|
||||
<p>Function overview (click item for more details):
|
||||
<table class="functionlist">
|
||||
<tr><td><a href="#vector.lua-vector">vector(x,y)</a></td><td>constructor</td></tr>
|
||||
<tr><td><a href="#vector.lua-isvector">isvector(v)</a></td><td>type check</td></tr>
|
||||
@ -412,6 +419,13 @@ result:foo() -- error: method does not exist</pre>
|
||||
(e.g. get the location of the mouse in the game world). It is possible to have
|
||||
more than one camera per game.</p>
|
||||
|
||||
<p>Accessors:
|
||||
<table class="functionlist">
|
||||
<tr><td><em>[vector]</em> <code>camera.pos</code></td><td>The camera's position. This is also the position it looks at.</td></tr>
|
||||
<tr><td><em>[number]</em> <code>camera.zoom</code></td><td>The camera's zoom level.</td></tr>
|
||||
<tr><td><em>[number]</em> <code>camera.rot</code></td><td>The camera's rotation.</td></tr>
|
||||
</table>
|
||||
</p>
|
||||
<p>The module defined the following funtions:
|
||||
<table class="functionlist">
|
||||
<tr><td><a href="#camera.lua-Camera">Camera(pos, zoom, rotation)</a></td><td>create new camera</td></tr>
|
||||
@ -593,15 +607,15 @@ camera:postdraw()</pre></td></tr>
|
||||
<div class="doc"><span class="function">function Gamestate.registerEvents()<a class="top" href="#gamestate.lua">^ top</a></span>
|
||||
Registers all above events so you don't need to call then in your <code>love.*</code> routines.
|
||||
<p>It is an error to call this anywhere else than <code>love.load()</code>, since it overwrites the
|
||||
callbacks. Dont worry though, your callbacks will still be executed.</p>
|
||||
callbacks. Don't worry though, your callbacks will still be executed.</p>
|
||||
</div>
|
||||
|
||||
<a name="gamestate.lua-callbackList"></a>
|
||||
<h4>List of callbacks<a class="top" href="#gamestate.lua">^ top</a></h4>
|
||||
<table class="functionlist">
|
||||
<tr><td><code>enter(previous, ...)</code></td>
|
||||
<td>Gets called upon entering the state. <em>Don't call this yourself, use
|
||||
<code>Gamestate.switch</code> instead.</em></td></tr>
|
||||
<td>Gets called upon entering the state. <strong>Don't call this yourself, use
|
||||
<code>Gamestate.switch</code> instead.</strong></td></tr>
|
||||
<tr><td><code>leave()</code></td>
|
||||
<td>Gets called upon leaving the state. The same warning as with <code>enter</code> applies.</td></tr>
|
||||
<tr><td><code>update(dt)</code></td>
|
||||
@ -625,6 +639,11 @@ camera:postdraw()</pre></td></tr>
|
||||
<p>A circular container that can hold arbitrary items. It can be used to create <em>Tomb Raider</em> style
|
||||
inventories, a looping music playlist, recurring dialog sequences and much more.</p>
|
||||
|
||||
<p>Accessors:
|
||||
<table class="functionlist">
|
||||
<tr><td><em>[table]</em><code>buffer.items</code></td><td>Items table. It is not recommended to read or write this directly.</td></tr>
|
||||
<tr><td><em>[number]</em><code>buffer.current</code></td><td>Index of current selection. Be careful with this.</td></tr>
|
||||
</table></p>
|
||||
<p>ringbuffer.lua defines the following functions:
|
||||
<table class="functionlist">
|
||||
<tr><td><a href="#ringbuffer.lua-Ringbuffer">Ringbuffer(...)</a></td><td>Create new ringbuffer</td></tr>
|
||||
|
Loading…
Reference in New Issue
Block a user