From 917910b1d819e7f7bdde69acf258e76d6eee3950 Mon Sep 17 00:00:00 2001 From: Luka Date: Thu, 14 Jul 2022 13:59:38 +0200 Subject: [PATCH 1/2] Added Tween Docs --- docs/Tween.html | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 docs/Tween.html diff --git a/docs/Tween.html b/docs/Tween.html new file mode 100644 index 0000000..f164a6e --- /dev/null +++ b/docs/Tween.html @@ -0,0 +1,71 @@ + + + + + + + Azurite Documentation + + + + + + + + + + + + + + +
+
+ +
+ + +
+

Tween

+

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

+ + + +
TypeMethodFunctionality
[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

+ + + + + + + +
TypeMethodFunctionality
booleantweenFinished()Checks whether current tween that is being processed has finished.
booleantweenFinishedAll()Checks whether all of the tweens have finished
voidplay()Start all of the tweens. MUST USE setUpTween() first!
voidsetUpTweenPosition(Vector2f startPos, Vector2f target, float duration, TweenMode tweenMode)Smoothly moves object from start position to target in desired time
voidsetUpTweenObject(Vector2f object, Vector2f startVal, Vector2f endVal, float duration, TweenMode tweenMode)Smoothly changes object value from startVal to endVal
+

Constructor

+ + + +
ConstructorFunctionality
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

- +
TypeMethodFunctionality
booleantweenFinished()Checks whether current tween that is being processed has finished.
booleantweenFinishedAll()Checks whether all of the tweens have finished
voidplay()Start all of the tweens. MUST USE setUpTween() first!
voidplay()Start all of the tweens. MUST USE setUpTweenPosition() or setUpTweenObject() first!
voidsetUpTweenPosition(Vector2f startPos, Vector2f target, float duration, TweenMode tweenMode)Smoothly moves object from start position to target in desired time
voidsetUpTweenObject(Vector2f object, Vector2f startVal, Vector2f endVal, float duration, TweenMode tweenMode)Smoothly changes object value from startVal to endVal