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
+
+//Paste example here
+
+
Fields
+
+
Type
Method
Functionality
+
[SCRAPER:WARNING] 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.
+
+
Methods
+
+
Type
Method
Functionality
+
boolean
tweenFinished()
Checks whether current tween that is being processed has finished.
+
boolean
tweenFinishedAll()
Checks whether all of the tweens have finished
+
void
play()
Start all of the tweens. MUST USE setUpTween() first!
Smoothly changes object value from startVal to endVal
+
+
Constructor
+
+
Constructor
Functionality
+
Tween()
Creates new Tween object.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From ec944ddde65a508118d2c08d248577908863ea92 Mon Sep 17 00:00:00 2001
From: Luka
Date: Thu, 14 Jul 2022 14:08:03 +0200
Subject: [PATCH 2/2] Add files via upload
---
docs/Tween.html | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/docs/Tween.html b/docs/Tween.html
index f164a6e..e4b5da2 100644
--- a/docs/Tween.html
+++ b/docs/Tween.html
@@ -35,7 +35,18 @@
Tween
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
-//Paste example here
+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();
+ }
Fields
@@ -47,7 +58,7 @@
Methods
Type
Method
Functionality
boolean
tweenFinished()
Checks whether current tween that is being processed has finished.
boolean
tweenFinishedAll()
Checks whether all of the tweens have finished
-
void
play()
Start all of the tweens. MUST USE setUpTween() first!
+
void
play()
Start all of the tweens. MUST USE setUpTweenPosition() or setUpTweenObject() first!