public static void FadeInWaitFadeOut(GameObject _gameObject, float _time, action.callback _onEndCallback = null, float _alpha = 0.5f) { if (_gameObject.GetComponent <GUITexture>() != null) { Color org = _gameObject.GetComponent <GUITexture>().color; Color dst = _gameObject.GetComponent <GUITexture>().color; org.a = 0; dst.a = _alpha; _gameObject.GetComponent <GUITexture>().color = org; new SuperTweener.GUItextureColor(_gameObject, _time, dst, SuperTweener.QuintOut, (GameObject _target) => { new SuperTweener.GUItextureColor(_gameObject, _time * 3.0f, dst, SuperTweener.LinearNone, (GameObject _target2) => { new SuperTweener.GUItextureColor(_gameObject, _time, org, SuperTweener.QuintIn, _onEndCallback); }); }); } else { if (_gameObject.GetComponent <GUIText>() != null) { Color org = _gameObject.GetComponent <GUIText>().color; Color dst = _gameObject.GetComponent <GUIText>().color; org.a = 0; dst.a = 1; _gameObject.GetComponent <GUIText>().color = org; new SuperTweener.GUITextColor(_gameObject, _time, dst, SuperTweener.QuintOut, (GameObject _target) => { new SuperTweener.GUITextColor(_gameObject, _time * 3.0f, dst, SuperTweener.LinearNone, (GameObject _target2) => { new SuperTweener.GUITextColor(_gameObject, _time, org, SuperTweener.QuintIn, _onEndCallback); }); }); } } }
public static void InWaitOut(GameObject _gameObject, float _time, Vector3 _dst, float _waitTime, action.callback _onEndCallback = null) { Vector3 org = _gameObject.transform.position; new SuperTweener.move(_gameObject, _time, _dst, SuperTweener.QuintOut, (GameObject _target) => { new SuperTweener.move(_gameObject, _waitTime, _dst, SuperTweener.LinearNone, (GameObject _target2) => { new SuperTweener.move(_gameObject, _time, org, SuperTweener.QuintIn, _onEndCallback); }); }); }