Advertisement
Guest User

Untitled

a guest
Sep 14th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1. using Holoville.HOTween;
  2. using Holoville.HOTween.Plugins;
  3. using Holoville.HOTween.Plugins.Core;
  4. using UnityEngine;
  5. using System.Collections;
  6.  
  7. public class MainMenuAnimation : MonoBehaviour
  8. {
  9.     public UISprite TitleSprite;
  10.     public float TitleFallSpeed = 0.35f;
  11.  
  12.  
  13.  
  14.     private Sequence _introSequence;
  15.  
  16.     void Awake()
  17.     {
  18.         _introSequence = new Sequence();
  19.         _introSequence.Append(HOTween.To(TitleSprite.gameObject.transform, TitleFallSpeed,
  20.                                            new TweenParms().Prop("localPosition", new PlugVector3Y(225)).Delay(0.5f).Ease(EaseType.EaseOutElastic)));
  21.     }
  22.  
  23.     void OnEnable()
  24.     {
  25.         _introSequence.Play();
  26.     }
  27.  
  28.     void OnDisable()
  29.     {
  30.         _introSequence.Rewind();
  31.     }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement