Esempio n. 1
0
        public ScreenFade(UnityEngine.GameObject target,
                          Color?color       = null,
                          Texture2D texture = null,
                          float delay       = 0,
                          float duration    = 0.5f,
                          TimeUpdateMethodType timeUpdateMethod = TimeUpdateMethodType.GameTime,
                          TransitionHelper.TweenType tweenType  = TransitionHelper.TweenType.linear,
                          AnimationCurve animationCurve         = null,
                          Action <TransitionStep> onStart       = null,
                          Action <TransitionStep> onUpdate      = null,
                          Action <TransitionStep> onComplete    = null) :
            base(target, delay: delay, duration: duration, timeUpdateMethod: timeUpdateMethod, tweenType: tweenType,
                 animationCurve: animationCurve, onStart: onStart, onUpdate: onUpdate, onComplete: onComplete)
        {
            _screenFadeComponents = new ScreenFadeComponents {
                PersistantAcrossScenes = true
            };

            Color   = color.HasValue ? color.Value : Color.white;
            Texture = texture;
        }
Esempio n. 2
0
 ///
 /// Called on first access to the singleon
 ///
 void Setup()
 {
     SharedScreenWipeComponents = new ScreenWipeComponents();
     SharedScreenFadeComponents = new ScreenFadeComponents();
 }