GDPFunctions/Miscellaneous.html
2019-04-24 11:56:11 -05:00

103 lines
No EOL
3.5 KiB
HTML

<!--Code Ninjas | Jackson Hagood-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Miscellaneous</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>
<h2><a href="miscellaneous.html">Miscellaneous</a></h2>
<ul id="contents">
<li><a href="#iskeypressed">isKeyPressed()</a></li>
<li><a href="#clone">.clone()</a></li>
<li><a href="#remove">.remove()</a></li>
<li><a href="#random">random()</a></li>
</ul>
</div>
<div name="Miscellaneous">
<h1>Miscellaneous</h1>
<div class="item"> <!--done-->
<a name="iskeypressed">
<h3>isKeyPressed()</h3>
<p>The function isKeyPressed() will return whether a specified key is being pressed. The function takes in one parameter, 'Keys.' and then the desired key.</p>
<pre><code>var pressed = isKeyPressed(Keys.space)
//sets the variable 'pressed' to whether the 'space' key is being pressed</code></pre>
<h4>See Further:</h4>
<ol class="more">
<li>Rain Catcher Part 2</li>
<li>Basic Pong With Keyboard</li>
</ol>
</a>
</div>
<br>
<div class="item">
<a name="clone">
<h3>.clone()</h3>
<p>The function .clone() will create a copy of an object. The function takes in no parameters.</p>
<pre><code>object.clone();
//clones 'object</code></pre>
<h4>See Further:</h4>
<ol class="more">
<li>Rain Catcher Part 4</li>
<li>Meteors Part 2</li>
</ol>
</a>
</div>
<br>
<div class="item">
<a name="remove">
<h3>.remove()</h3>
<p>The function .remove() will remove an object. The function takes in no parameters.</p>
<pre><code>object.remove();
//removes 'object'</code></pre>
<h4>See Further:</h4>
<ol class="more">
<li>Starscape</li>
<li>Zapper Part 1</li>
</ol>
</a>
</div>
<br>
<!--.play()-->
<br>
<div class="item">
<a name="random">
<h3>random()</h3>
<p>The function random will return a random number within a range. The function takes in two parameters. The first number in the range, and the final number in the range.</p>
<pre><code>var random = random(1,100)
//sets variable 'random' to a random number between 1 and 100</code></pre>
<h4>See Further:</h4>
<ol class="more">
<li>Rain Catcher Part 3</li>
<li>Shooting Stars</li>
</ol>
</a>
</div>
</div>
</body>
</html>