public void Play(float?_delay = null) { TweenSprite copy = Util.InstantiateAt <TweenSprite>(this, targetParent ?? transform.parent); copy.gameObject.SetActive(true); if (delay == 0f) { copy._Play(); } else { Util.Tween(_delay ?? delay, null, copy._Play); } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); TweenSprite t = target as TweenSprite; GUILayout.Space(20); if (GUILayout.Button("Copy Tweens")) { tweens = t.tweens; } if (tweens != null && GUILayout.Button("Paste Tweens")) { Array.Copy(tweens, t.tweens, tweens.Length); EditorUtility.SetDirty(t); tweens = null; } }
public void Start(TweenSprite sprite) { if (easeFade != Ease.Unset) { sprite.cg.DOFade(alpha, duration).SetEase(easeFade); } if (easeScale != Ease.Unset) { sprite.transform.DOScale(scale, duration).SetEase(easeScale); } if (easeRotation != Ease.Unset) { sprite.transform.DORotate(rotation, duration).SetEase(easeRotation); } if (easeMove != Ease.Unset) { (sprite.transform as RectTransform).DOAnchorPos(anchorPos, duration).SetEase(easeMove); } }