ITween - adds tween offsetting #22
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is very simple but rather usable change allowing to dynamically offset tweened values. It's usable when adding some more dynamic behaviour to tweened object by adding e.g. noise, and allows more advanced tween compositions: just implement your own TweenTarget and call setOffset() on original tween in e.g. Update with your target value - the resulting tweening will be additive composition of the original and your target tween.
( the tweened values types should be also the same -
Only ITween interface is modified in this PR - it should probably be available also on AbstractTweenable and this whole composition thing should be probably more generic / easier to set up to be proper ZestKit 'feature'.
note: not entirely sure about additive properties of Quaternions and Color, Color32, esp. in case of color types adding values should be in proper color space and not simple arithmetic addition.
Feel free to rename/tidy up/change or rip apart :) -- I tried to choose proper level of abstraction but maybe it is doable in a better way.