private void CalcDuration <T>(Reset <T> reset) { if (reset.resetType == ResetType.Yoyo) { duration /= 2; } }
private void Handle <T>(ref string type, FromToValue <T> fromToValue, Reset <T> reset, Action callback, Func <Tweener> func) { if (!propertyType.Equals(type)) { return; } tween = func(); Loop(reset, callback); AddIsFrom(fromToValue); }
private void Loop <T>(Reset <T> reset, Action resetCallback) { switch (reset.resetType) { case ResetType.Yoyo: tween.SetLoops(reset.loop ? -1 : 2, LoopType.Yoyo); break; case ResetType.ToValue: tween.SetLoops(reset.loop ? -1 : 1, LoopType.Restart); tween.onComplete += () => resetCallback(); break; } }