Created
July 2, 2013 12:42
-
-
Save ftvs/5908953 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using Holoville.HOTween; | |
public class GUIUtils : MonoBehaviour | |
{ | |
public UISprite transition; | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static Tweener Transition(Color transitionColor) | |
{ | |
if (Instance == null) | |
{ | |
ThrowNullInstanceException(); | |
return null; | |
} | |
TweenParms parms = new TweenParms() | |
.Prop("color", transitionColor) | |
.UpdateType(UpdateType.TimeScaleIndependentUpdate); | |
Tweener transitionTween = HOTween.To(Instance.transition, 1f, parms); | |
return transitionTween; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment