GDPFunctions/attributes.html
2019-04-26 09:37:24 -05:00

64 lines
2.3 KiB
HTML

<!--Code Ninjas | Jackson Hagood-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Attributes</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<link rel="icon" href="images/icon.png">
<style>
</style>
</head>
<body>
<div class="sidenav">
<a href="functions.html"><h2>GDP Functions</h2></a>
<br>
<h2><a href="position.html">Position</a></h2>
<h2><a href="rotation.html">Rotation</a></h2>
<h2><a href="scale.html">Scale</a></h2>
<h2><a href="collision.html">Collision</a></h2>
<h2><a href="appearance.html">Appearance</a></h2>
<h2><a href="timers.html">Timers</a></h2>
<h2><a href="animation.html">Animation</a></h2>
<h2><a href="attributes.html">Attributes</a></h2>
<ul id="contents">
<li><a href="#state">.state()</a></li>
<li><a href="#text">.text()</a></li>
</ul>
<h2><a href="miscellaneous.html">Miscellaneous</a></h2>
</div>
<div name="Attributes"> <!--done-->
<h1>Attributes</h1>
<div class="item"> <!--done-->
<a name="state">
<h3>.state()</h3>
<p>The function .state() will return the state property of an object. Most commonly, .state() is used to find the game's current state. The function takes in no parameters.</p>
<pre><code>var state = $this.scene.state();
//sets 'state' to the current state of the 'scene'</code></pre>
<h4>See Further:</h4>
<ol class="more">
<li>Meteors Deluxe</li>
</ol>
</a>
</div>
<br>
<div class="item"> <!--done-->
<a name="text">
<h3>.text()</h3>
<p>The function .text() can change the text property of a label. The function takes in one parameter: the desired text of the label.</p>
<pre><code>object.text("string");
//sets the text of the 'object' label to 'string'</code></pre>
<h4>See Further:</h4>
<ol class="more">
<li>Meteors Deluxe</li>
</ol>
</a>
</div>
<!--.findName()-->
</div>
</body>
</html>