mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
531 lines
16 KiB
HTML
531 lines
16 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<head>
|
|
<title>TombEngine 1.2 Lua API</title>
|
|
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id="container">
|
|
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div> <!-- id="product" -->
|
|
|
|
|
|
<div id="main">
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
<div id="navigation">
|
|
<br/>
|
|
<h1>TombEngine</h1>
|
|
|
|
<ul>
|
|
<li><a href="../index.html">Index</a></li>
|
|
</ul>
|
|
|
|
<h2>1 Modules</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../1 modules/Effects.html">Effects</a></li>
|
|
<li> <a href="../1 modules/Flow.html">Flow</a></li>
|
|
<li> <a href="../1 modules/Input.html">Input</a></li>
|
|
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
|
|
<li> <a href="../1 modules/Logic.html">Logic</a></li>
|
|
<li> <a href="../1 modules/Objects.html">Objects</a></li>
|
|
<li> <a href="../1 modules/Sound.html">Sound</a></li>
|
|
<li> <a href="../1 modules/Strings.html">Strings</a></li>
|
|
<li> <a href="../1 modules/Util.html">Util</a></li>
|
|
<li> <a href="../1 modules/View.html">View</a></li>
|
|
</ul>
|
|
<h2>2 Classes</h2>
|
|
<ul class="nowrap">
|
|
<li> <here>View.DisplaySprite</here></li>
|
|
<li> <a href="../2 classes/Flow.Animations.html">Flow.Animations</a></li>
|
|
<li> <a href="../2 classes/Flow.Fog.html">Flow.Fog</a></li>
|
|
<li> <a href="../2 classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
|
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
|
<li> <a href="../2 classes/Flow.Mirror.html">Flow.Mirror</a></li>
|
|
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
|
<li> <a href="../2 classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
|
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
|
|
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
|
|
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
|
|
<li> <a href="../2 classes/Objects.Moveable.html">Objects.Moveable</a></li>
|
|
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
|
|
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
|
|
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
|
|
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
|
|
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
|
|
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
|
|
</ul>
|
|
<h2>3 Primitive Classes</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
|
|
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
|
|
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
|
|
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
|
|
</ul>
|
|
<h2>4 Enums</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
|
|
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
|
|
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
|
|
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
|
|
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
|
|
<li> <a href="../4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></li>
|
|
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
|
|
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
|
|
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
|
|
<li> <a href="../4 enums/Sound.SoundTrackType.html">Sound.SoundTrackType</a></li>
|
|
<li> <a href="../4 enums/Util.LogLevel.html">Util.LogLevel</a></li>
|
|
<li> <a href="../4 enums/View.AlignMode.html">View.AlignMode</a></li>
|
|
<li> <a href="../4 enums/View.CameraType.html">View.CameraType</a></li>
|
|
<li> <a href="../4 enums/View.ScaleMode.html">View.ScaleMode</a></li>
|
|
</ul>
|
|
<h2>5 Lua utility modules</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
|
|
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<h1>Class <code>View.DisplaySprite</code></h1>
|
|
<p>Represents a display sprite.</p>
|
|
<p>
|
|
|
|
</p>
|
|
|
|
|
|
<h2><a href="#Functions">Functions</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite">DisplaySprite(ID, int, pos, rot, scale[, color])</a></td>
|
|
<td class="summary">Create a DisplaySprite object.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:GetObjectID">DisplaySprite:GetObjectID()</a></td>
|
|
<td class="summary">Get the object ID of the sprite sequence object used by the display sprite.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:GetSpriteID">DisplaySprite:GetSpriteID()</a></td>
|
|
<td class="summary">Get the sprite ID in the sprite sequence object used by the display sprite.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:GetPosition">DisplaySprite:GetPosition()</a></td>
|
|
<td class="summary">Get the display position of the display sprite in percent.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:GetRotation">DisplaySprite:GetRotation()</a></td>
|
|
<td class="summary">Get the rotation of the display sprite in degrees.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:GetScale">DisplaySprite:GetScale()</a></td>
|
|
<td class="summary">Get the horizontal and vertical scale of the display sprite in percent.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:GetColor">DisplaySprite:GetColor()</a></td>
|
|
<td class="summary">Get the color of the display sprite.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:SetObjectID">DisplaySprite:SetObjectID(New)</a></td>
|
|
<td class="summary">Set the sprite sequence object ID used by the display sprite.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:SetSpriteID">DisplaySprite:SetSpriteID(New)</a></td>
|
|
<td class="summary">Set the sprite ID in the sprite sequence object used by the display sprite.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:SetPosition">DisplaySprite:SetPosition(New)</a></td>
|
|
<td class="summary">Set the display position of the display sprite in percent.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:SetRotation">DisplaySprite:SetRotation(New)</a></td>
|
|
<td class="summary">Set the rotation of the display sprite in degrees.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:SetScale">DisplaySprite:SetScale(New)</a></td>
|
|
<td class="summary">Set the horizontal and vertical scale of the display sprite in percent.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:SetColor">DisplaySprite:SetColor(New)</a></td>
|
|
<td class="summary">Set the color of the display sprite.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#DisplaySprite:Draw">DisplaySprite:Draw([priority][, alignMode][, scaleMode][, blendMode])</a></td>
|
|
<td class="summary">Draw the display sprite in display space for the current frame.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "DisplaySprite"></a>
|
|
<strong>DisplaySprite(ID, int, pos, rot, scale[, color])</strong>
|
|
</dt>
|
|
<dd>
|
|
Create a DisplaySprite object.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">ID</span>
|
|
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
|
|
of the sprite sequence object.
|
|
</li>
|
|
<li><span class="parameter">int</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
spriteID ID of the sprite in the sequence.
|
|
</li>
|
|
<li><span class="parameter">pos</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
|
|
Display position in percent.
|
|
</li>
|
|
<li><span class="parameter">rot</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
Rotation in degrees.
|
|
</li>
|
|
<li><span class="parameter">scale</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
|
|
Horizontal and vertical scale in percent. Scaling is interpreted by the DisplaySpriteEnum.ScaleMode passed to the Draw() function call.
|
|
</li>
|
|
<li><span class="parameter">color</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
|
Color. <strong>Default: Color(255, 255, 255, 255)</strong>
|
|
(<em>optional</em>)
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../2 classes/View.DisplaySprite.html#DisplaySprite">DisplaySprite</a></span>
|
|
A new DisplaySprite object.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:GetObjectID"></a>
|
|
<strong>DisplaySprite:GetObjectID()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the object ID of the sprite sequence object used by the display sprite. ()
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
|
|
Sprite sequence object ID.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:GetSpriteID"></a>
|
|
<strong>DisplaySprite:GetSpriteID()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the sprite ID in the sprite sequence object used by the display sprite. ()
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
Sprite ID in the sprite sequence object.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:GetPosition"></a>
|
|
<strong>DisplaySprite:GetPosition()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the display position of the display sprite in percent. ()
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
|
|
Display position in percent.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:GetRotation"></a>
|
|
<strong>DisplaySprite:GetRotation()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the rotation of the display sprite in degrees. ()
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">float</span></span>
|
|
Rotation in degrees.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:GetScale"></a>
|
|
<strong>DisplaySprite:GetScale()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the horizontal and vertical scale of the display sprite in percent. ()
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
|
|
Horizontal and vertical scale in percent.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:GetColor"></a>
|
|
<strong>DisplaySprite:GetColor()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the color of the display sprite. ()
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
|
Color.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:SetObjectID"></a>
|
|
<strong>DisplaySprite:SetObjectID(New)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the sprite sequence object ID used by the display sprite. (Objects.ObjID)
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">New</span>
|
|
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
|
|
sprite sequence object ID.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:SetSpriteID"></a>
|
|
<strong>DisplaySprite:SetSpriteID(New)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the sprite ID in the sprite sequence object used by the display sprite. (int)
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">New</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
sprite ID in the sprite sequence object.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:SetPosition"></a>
|
|
<strong>DisplaySprite:SetPosition(New)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the display position of the display sprite in percent. (Vec2)
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">New</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
|
|
display position in percent.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:SetRotation"></a>
|
|
<strong>DisplaySprite:SetRotation(New)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the rotation of the display sprite in degrees. (float)
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">New</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
rotation in degrees.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:SetScale"></a>
|
|
<strong>DisplaySprite:SetScale(New)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the horizontal and vertical scale of the display sprite in percent. (Vec2)
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">New</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
horizontal and vertical scale in percent.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:SetColor"></a>
|
|
<strong>DisplaySprite:SetColor(New)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the color of the display sprite. (Color)
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">New</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
color.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "DisplaySprite:Draw"></a>
|
|
<strong>DisplaySprite:Draw([priority][, alignMode][, scaleMode][, blendMode])</strong>
|
|
</dt>
|
|
<dd>
|
|
Draw the display sprite in display space for the current frame.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">priority</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Draw priority. Can be thought of as a layer, with higher values having precedence. <strong>Default: 0</strong>
|
|
(<em>optional</em>)
|
|
</li>
|
|
<li><span class="parameter">alignMode</span>
|
|
<span class="types"><a class="type" href="../4 enums/View.AlignMode.html#">AlignMode</a></span>
|
|
Align mode interpreting an offset from the sprite's position. <strong>Default: View.AlignMode.CENTER</strong>
|
|
(<em>optional</em>)
|
|
</li>
|
|
<li><span class="parameter">scaleMode</span>
|
|
<span class="types"><a class="type" href="../4 enums/View.ScaleMode.html#">ScaleMode</a></span>
|
|
Scale mode interpreting the display sprite's horizontal and vertical scale. <strong>Default: View.ScaleMode.FIT</strong>
|
|
(<em>optional</em>)
|
|
</li>
|
|
<li><span class="parameter">blendMode</span>
|
|
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
|
|
Blend mode. <strong>Default: Effects.BlendID.ALPHABLEND</strong>
|
|
(<em>optional</em>)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
</div> <!-- id="main" -->
|
|
<div id="about">
|
|
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
|
|
<i style="float:right;">Last updated 2023-12-26 20:44:45 </i>
|
|
</div> <!-- id="about" -->
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|