TweenGMS 2 Beta 7


Being a potential release candidate, this beta offers a few refinements. 

TweenAddCallbackUser() is now deprecated as TweenAddCallback() now directly supports user events by supplying values between 0-15 as the script argument.

TweenPlay() now supports multi-tween ids, so you can now do stuff like TweenPlay(self) | TweenPlay({group: 5}).

TweenCalc() has been updated to support "amount" and "time" with a second optional argument, making TweenCalcAmount() and TweenCalcTime() deprecated and to be removed with a future update.

Though still far from finished, I have begun to get the documentation better organized and ready for being fleshed out. Obsolete functions should now be gone from the Script Reference. The "Demo Project" linked in TGMS_Documentation has been updated to use the current beta.

Please be aware that you should still be careful when using structs as targets. I only advise this for advanced users, as the garbage collector can fail to clear tweens as quickly as when using instance targets. When possible, please manually destroy tweens which use struct targets.

A list of changes for this update can be found below:

[7.0]
- TweenEasyUseDelta() now returns current true/false state
- TWEEN_SELF now usuable inside property setter/getter functions
- Updated handling of initial tween state when firing tween
- Updated automatic cleanup for event callbacks
- Fixed callbacks not being properly invalidated
- Numbers 0-15 can now be used to call user events for callbacks
  * TweenAddCallbackUser() is now deprecated
  * examples:
  // Call user event 5 when finished
  TweenAddCallback(tweenID, "finish", id, 5);
  // Same as above but inlined with TweenFire
  TweenFire("$60", "x", 0, 100", "@finish", 5);
- TweenPlay() now supports multi-tween selection
  * e.g. TweenPlay(self) | TweenPlay({group: 5})
- Improved support for selecting tween instance targets with 'self'
  * TweenPause({target: self})
  * The 'other' keyword is not supported in this case
  * You can still directly do TweenPause(self) or TweenPause(other)
- Updated TweenCalc()
  * Now supports animation curves
  * Improved performance
  * TweenCalcAmount() and TweenCalcTime() are now deprecated
- Removed option for null property strings ("") which broke HTML5
  * Please use "undefined" instead if needing null properties

Files

TweenGMS 2 Beta 7 (Requires GMS 2.3.2) 75 kB
Apr 25, 2021

Get TweenGMS

Leave a comment

Log in with itch.io to leave a comment.