diff --git a/docs/Tween.html b/docs/Tween.html new file mode 100644 index 0000000..e4b5da2 --- /dev/null +++ b/docs/Tween.html @@ -0,0 +1,82 @@ + + + + + + + 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

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

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

Constructor

+ + + +
ConstructorFunctionality
Tween()Creates new Tween object.
+ +
+
+
+ + + + + + + + + \ No newline at end of file