1
0
Fork 0
mirror of https://github.com/Reuh/ubiquitousse.git synced 2025-10-27 17:19:31 +00:00

ldtk: rename Layer.offsetX/Y to Layer.x/y, add Level:drawBackground

This commit is contained in:
Étienne Fildadut 2021-12-27 13:26:15 +01:00
parent 86373c98de
commit f78499e891
12 changed files with 70 additions and 35 deletions

View file

@ -206,11 +206,11 @@ end
<td class="summary">The layer order: smaller order means it is on top.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layer.offsetX">Layer.offsetX</a></td>
<td class="name" nowrap><a href="#Layer.x">Layer.x</a></td>
<td class="summary">X position of the layer relative to the level.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layer.offsetY">Layer.offsetY</a></td>
<td class="name" nowrap><a href="#Layer.y">Layer.y</a></td>
<td class="summary">Y position of the layer relative to the level.</td>
</tr>
<tr>
@ -312,7 +312,11 @@ end
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Level:draw">Level:draw ()</a></td>
<td class="summary">Draw this level.</td>
<td class="summary">Draw this level (background and layers).</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Level:drawBackground">Level:drawBackground ()</a></td>
<td class="summary">Draw this level background.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Level:load">Level:load ([, callbacks])</a></td>
@ -909,8 +913,8 @@ end
</dd>
<dt>
<a name = "Layer.offsetX"></a>
<strong>Layer.offsetX</strong>
<a name = "Layer.x"></a>
<strong>Layer.x</strong>
</dt>
<dd>
X position of the layer relative to the level.
@ -930,8 +934,8 @@ end
</dd>
<dt>
<a name = "Layer.offsetY"></a>
<strong>Layer.offsetY</strong>
<a name = "Layer.y"></a>
<strong>Layer.y</strong>
</dt>
<dd>
Y position of the layer relative to the level.
@ -1458,7 +1462,7 @@ end
<strong>Level:draw ()</strong>
</dt>
<dd>
Draw this level.
Draw this level (background and layers).
Assumes we are currently in world coordinates (i.e. world top-left is at 0,0).
The level must be loaded.
Will draw the eventual backgrounds and all the layers in the level.
@ -1476,6 +1480,29 @@ end
</dd>
<dt>
<a name = "Level:drawBackground"></a>
<strong>Level:drawBackground ()</strong>
</dt>
<dd>
Draw this level background.
Assumes we are currently in level coordinates (i.e. level top-left is at 0,0).
The level must be loaded.
<h3>Requires:</h3>
<ul>
love
</ul>
</ul>
</ul>
</ul>
</dd>
<dt>
<a name = "Level:load"></a>
@ -1754,7 +1781,7 @@ end
Level background. </p>
<p> If there is a background image, <code>background.image</code> contains a table <code>{image=image, x=number, y=number, sx=number, sy=number}</code>
where <a href="../modules/ldtk.html#Tileset.image">image</a> is the LÖVE image (or image filepath if LÖVE not available) <a href="../modules/ldtk.html#Level.x">x</a> and <a href="../modules/ldtk.html#Tile.y">y</a> are the top-left position,
where <a href="../modules/ldtk.html#Tileset.image">image</a> is the LÖVE image (or image filepath if LÖVE not available) <a href="../modules/ldtk.html#Entity.x">x</a> and <a href="../modules/ldtk.html#Entity.y">y</a> are the top-left position,
and <a href="../modules/ldtk.html#Entity.sx">sx</a> and <a href="../modules/ldtk.html#Entity.sy">sy</a> the horizontal and vertical scale factors.
</ul>
@ -1829,7 +1856,7 @@ end
<li>Enum are converted into a Lua string giving the currently selected enum value.</li>
<li>Filepath are converted into a Lua string giving the file path.</li>
<li>Arrays are converted into a Lua table with the elements in it as a list.</li>
<li>Points are converted into a Lua table with the fields <a href="../modules/ldtk.html#Level.x">x</a> and <a href="../modules/ldtk.html#Tile.y">y</a>: <code>{ x=number, y=number }</code>.</li>
<li>Points are converted into a Lua table with the fields <a href="../modules/ldtk.html#Entity.x">x</a> and <a href="../modules/ldtk.html#Entity.y">y</a>: <code>{ x=number, y=number }</code>.</li>
<li>Colors are converted into a Lua table with the red, green and blue components in [0-1] as a list: <code>{r,g,b}</code>.</li>
</ul>
@ -1855,7 +1882,7 @@ end
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2021-12-27 13:15:05 </i>
<i style="float:right;">Last updated 2021-12-27 13:22:21 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>