Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions docs/Tween.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta className="viewport" content="width=device-width, initial-scale=1.0">
<title>Azurite Documentation</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="../js/getBaseURL.js"></script>
</head>

<body>
<!-- Insert the top navigation bar and welcome header -->
<script src="../js/insert/navbar.js"></script>
<!-- Insert the top navigation bar and welcome header -->
<script src="../js/insert/header.js"></script>

<script>
// Change these to the title of the documentation topic/item
setHeader("Tween", "");
</script>

<!-- Documentation -->
<div class="documentation">
<div class="container grid contentparent" id="docs">
<!-- Documentation Legend -->
<div class="legend-card"></div>

<!-- Documentation Content -->
<div class="card">
<h2>Tween</h2>
<p>This class provides Tweening with easing in and out
for smooth movement from point to point.
Great for moving platforms or moving AI to exact spot for desired time.
Also great for changing values of any property including colors and size</p>
<pre class="syntax-java">
EXAMPLE: Adds all tween modes and plays them only once!

gameObject.addComponent(new Tween());

if(!gameObject.getComponent(Tween.class).tweenFinishedAll()) {
gameObject.getComponent(Tween.class).setUpTweenPosition( new Vector2f(gameObject.getPositionData()[0], gameObject.getPositionData()[1]), new Vector2f(800, 600), 2, Tween.TweenMode.EASING_IN);
gameObject.getComponent(Tween.class).setUpTweenPosition( new Vector2f(800, 600), new Vector2f(gameObject.getPositionData()[0], gameObject.getPositionData()[1]), 2, Tween.TweenMode.EASING_OUT);
gameObject.getComponent(Tween.class).setUpTweenPosition( new Vector2f(gameObject.getPositionData()[0], gameObject.getPositionData()[1]), new Vector2f(800, 600), 1, Tween.TweenMode.NO_EASING);
gameObject.getComponent(Tween.class).setUpTweenPosition( new Vector2f(800, 600), new Vector2f(gameObject.getPositionData()[0], gameObject.getPositionData()[1]), 1, Tween.TweenMode.EASING_IN_OUT);

gameObject.getComponent(Tween.class).play();
}
</pre>
<h3>Fields</h3>
<table>
<tr><th>Type</th><th>Method</th><th>Functionality</th></tr>
<tr><td><div class="danger"><strong>[SCRAPER:WARNING]</strong> The JavaDoc Scraper was unable to find the any data for the fields table. Please manually add any missing data or remove this warning and table.</div></td><td></td><td></td></tr>
</table>
<h3>Methods</h3>
<table>
<tr><th>Type</th><th>Method</th><th>Functionality</th></tr>
<tr><td>boolean</td><td>tweenFinished()</td><td>Checks whether current tween that is being processed has finished.</td></tr>
<tr><td>boolean</td><td>tweenFinishedAll()</td><td>Checks whether all of the tweens have finished</td></tr>
<tr><td>void</td><td>play()</td><td>Start all of the tweens. MUST USE <b>setUpTweenPosition()</b> or <b>setUpTweenObject()</b> first!</td></tr>
<tr><td>void</td><td>setUpTweenPosition(Vector2f startPos, Vector2f target, float duration, TweenMode tweenMode)</td><td>Smoothly moves object from start position to target in desired time</td></tr>
<tr><td>void</td><td>setUpTweenObject(Vector2f object, Vector2f startVal, Vector2f endVal, float duration, TweenMode tweenMode)</td><td>Smoothly changes object value from startVal to endVal</td></tr>
</table>
<h3>Constructor</h3>
<table>
<tr><th>Constructor</th><th>Functionality</th></tr>
<tr><td>Tween()</td><td>Creates new Tween object.</td></tr>
</table>

</div>
</div>
</div>

<!-- Insert the navigation legend and footer -->
<script src="../js/insert/legendDocs.js"></script>
<script src="../js/insert/footer.js"></script>

<script src="../js/syntaxHighlighting.js"></script>
</body>

</html>