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 @@ + + + +
+ + +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();
+ }
+
+ | 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. |
| 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 setUpTweenPosition() or setUpTweenObject() first! |
| void | setUpTweenPosition(Vector2f startPos, Vector2f target, float duration, TweenMode tweenMode) | Smoothly moves object from start position to target in desired time |
| void | setUpTweenObject(Vector2f object, Vector2f startVal, Vector2f endVal, float duration, TweenMode tweenMode) | Smoothly changes object value from startVal to endVal |
| Constructor | Functionality |
|---|---|
| Tween() | Creates new Tween object. |