Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Holoville.HOTween;
- using Holoville.HOTween.Plugins;
- using Holoville.HOTween.Plugins.Core;
- using UnityEngine;
- using System.Collections;
- public class MainMenuAnimation : MonoBehaviour
- {
- public UISprite TitleSprite;
- public float TitleFallSpeed = 0.35f;
- private Sequence _introSequence;
- void Awake()
- {
- _introSequence = new Sequence();
- _introSequence.Append(HOTween.To(TitleSprite.gameObject.transform, TitleFallSpeed,
- new TweenParms().Prop("localPosition", new PlugVector3Y(225)).Delay(0.5f).Ease(EaseType.EaseOutElastic)));
- }
- void OnEnable()
- {
- _introSequence.Play();
- }
- void OnDisable()
- {
- _introSequence.Rewind();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement