Beispiel #1
0
        } //END IsFloorTrackerIconEnabled

        //------------------------------------//
        public override void EnableFloorTrackerIcon()
        //------------------------------------//
        {
#if VUFORIA
            if ( floorIconColorTweener != null )
            {
                UnityEngine.Events.UnityEvent _event = new UnityEngine.Events.UnityEvent();
                _event.AddListener(EnableFloorTrackerIconComplete);

                floorIconColorTweener.Play( UITweener.TweenValue.Show, _event );

                //DOB NOTE: This is a hack to track when floor tracking is restored by looking at when the tracking icon is re-enabled
                SendFloorTrackingFoundEvent();
            }
#endif

        } //END EnableFloorTrackerIcon
Beispiel #2
0
        } //END CallEvent

        //----------------------------------//
        private void CallChangeColorEvent()
        //----------------------------------//
        {

            if( DoesChangeColorObjectExist() )
            {
                if( changeColorSettings == ChangeColorSettings.ChangeToColor && changeColorOn != ChangeColorOn.UIColorAnimation )
                {
                    if( changeColorOn == ChangeColorOn.MeshRenderer ) { color_MeshRenderer.sharedMaterial.color = changeToColor; }
                    else if( changeColorOn == ChangeColorOn.Material ) { color_Material.color = changeToColor; }
                    else if( changeColorOn == ChangeColorOn.RawImage ) { color_RawImage.color = changeToColor; }
                    else if( changeColorOn == ChangeColorOn.Image ) { color_Image.color = changeToColor; }
                    else if( changeColorOn == ChangeColorOn.SpriteRenderer ) { color_SpriteRenderer.color = changeToColor; }
                    else if( changeColorOn == ChangeColorOn.Text ) { color_Text.color = changeToColor; }
                    else if( changeColorOn == ChangeColorOn.CanvasGroup ) { color_CanvasGroup.alpha = changeToColor.a; }
                    else if( changeColorOn == ChangeColorOn.UIColorTweener ) { color_UIColorTweener.Force( changeToColor, changeColorTweenValue ); }
                    else if( changeColorOn == ChangeColorOn.UIColorTweenManager ) { color_UIColorTweenManager.Force( changeToColor, changeColorTweenValue ); }

                    if( colorSettingsSetToChange() && onChangeColor != null ) { onChangeColor.Invoke(); }
                }
                else if( changeColorSettings == ChangeColorSettings.FadeToColor && changeColorOn != ChangeColorOn.UIColorAnimation )
                {
                    /*
                    string property = "_Color";

                    if( IsChangeMaterialColorPropertyTrue() )
                    {
                        property = materialProperty;
                    }
                    */

                    UnityEvent _event = new UnityEvent();
                    _event.AddListener( LoadColorTweenComplete );

                    if( changeColorOn == ChangeColorOn.MeshRenderer )               { TweenManager.Color( color_MeshRenderer, changeToColor, colorTweenSpeed, colorEaseType, color_MeshRenderer.sharedMaterial.color, colorTweenDelay, false, _event ); }
                    else if( changeColorOn == ChangeColorOn.Material )              { TweenManager.Color( color_Material, changeToColor, colorTweenSpeed, colorEaseType, color_Material.color, colorTweenDelay, false, _event ); }
                    else if( changeColorOn == ChangeColorOn.RawImage )              { TweenManager.Color( color_RawImage, changeToColor, colorTweenSpeed, colorEaseType, color_RawImage.color, colorTweenDelay, false, _event ); }
                    else if( changeColorOn == ChangeColorOn.Image )                 { TweenManager.Color( color_Image, changeToColor, colorTweenSpeed, colorEaseType, color_Image.color, colorTweenDelay, false, _event ); }
                    else if( changeColorOn == ChangeColorOn.SpriteRenderer )        { TweenManager.Color( color_SpriteRenderer, changeToColor, colorTweenSpeed, colorEaseType, color_SpriteRenderer.color, colorTweenDelay, false, _event ); }
                    else if( changeColorOn == ChangeColorOn.Text )                  { TweenManager.Color( color_Text, changeToColor, colorTweenSpeed, colorEaseType, color_Text.color, colorTweenDelay, false, _event ); }
                    else if( changeColorOn == ChangeColorOn.CanvasGroup )           { TweenManager.Color( color_CanvasGroup, changeToColor, colorTweenSpeed, colorEaseType, new Color( Color.white.r, Color.white.g, Color.white.b, color_CanvasGroup.alpha ), colorTweenDelay, false, _event ); }
                    else if( changeColorOn == ChangeColorOn.UIColorTweener )        { color_UIColorTweener.Play( UITweener.TweenValue.Show, changeToColor, colorTweenSpeed, colorTweenDelay, colorEaseType, _event ); }
                    else if( changeColorOn == ChangeColorOn.UIColorTweenManager )   { color_UIColorTweenManager.Play( UITweener.TweenValue.Show, changeToColor, colorTweenSpeed, colorTweenDelay, colorEaseType, _event ); }

                }
                else if( changeColorOn == ChangeColorOn.UIColorAnimation )
                {
                    if( color_UIColorAnimation.colorsToAnimateTo == null ) { color_UIColorAnimation.colorsToAnimateTo = new Color[] { }; }
                    if( color_UIColorAnimation.animationSpeeds == null ) { color_UIColorAnimation.animationSpeeds = new float[] { }; }
                    if( color_UIColorAnimation.easeTypes == null ) { color_UIColorAnimation.easeTypes = new EaseCurve.EaseType[] { }; }
                    if( color_UIColorAnimation.delays == null ) { color_UIColorAnimation.delays = new float[] { }; }

                    color_UIColorAnimation.colorsToAnimateTo = changeToColorArray;
                    color_UIColorAnimation.animationSpeeds = changeColorAnimationSpeeds;
                    color_UIColorAnimation.easeTypes = changeColorAnimationEaseTypes;
                    color_UIColorAnimation.delays = changeColorAnimationDelays;

                    if( playColorAnimation ) { color_UIColorAnimation.Play(); }

                    if( colorSettingsSetToChange() && onChangeColor != null ) { onChangeColor.Invoke(); }
                }
            }

        } //END CallChangeColorEvent