Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ftvs
Created July 2, 2013 12:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ftvs/5908953 to your computer and use it in GitHub Desktop.
Save ftvs/5908953 to your computer and use it in GitHub Desktop.
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