//--------------------------------// public override void Show() //--------------------------------// { base.Show(); uiScaleTweener_Image.Play( UITweener.TweenValue.Show ); uiColorTweenManager_Image.Play( UITweener.TweenValue.Show ); showingImage = true; } //END Show
//--------------------------------// public override void Show() //--------------------------------// { base.Show(); uiScaleTweener_TextAndBackgroundParent.Play( UITweener.TweenValue.Show ); //Debug.Log( "BlockText.cs Show()" ); uiColorTweenManager_Text.Play( UITweener.TweenValue.Show ); } //END Show
} //END Force //---------------------------------------// public void Show( Color fadeToColor, float fadeSpeed, float delay, EaseCurve.EaseType easeCurve, UnityEvent onCompleteFunction ) //---------------------------------------// { if( showDebug ) { Debug.Log( "ScreenFadeManager.cs Show( onComplete ) " + onCompleteFunction.ToString() ); } if( uiColorTweenManager_ScreenFader != null ) { uiColorTweenManager_ScreenFader.Play( UITweener.TweenValue.Show, fadeToColor, fadeSpeed, delay, easeCurve, onCompleteFunction ); } } //END Show
} //END Awake //--------------------------------// public virtual void Show() //--------------------------------// { //if( gameObject.name == "Load Block" ) { Debug.Log( "UIButton.cs Show() : " + gameObject.name ); } if( uiScaleAnimation_ScaleInAndOut != null ) { uiScaleAnimation_ScaleInAndOut.Play(); } if( uiColorTweenManager_Background != null ) { uiColorTweenManager_Background.Play( UITweener.TweenValue.Show ); } if( uiColorTweenManager_Icon != null ) { uiColorTweenManager_Icon.Play( UITweener.TweenValue.Show ); } if( uiColorTweenManager_FillImage != null ) { uiColorTweenManager_FillImage.Play( UITweener.TweenValue.Show ); } if( uiColorTweenManager_TextDescription != null ) { uiColorTweenManager_TextDescription.Play( UITweener.TweenValue.Show ); } if( buttonCollider != null ) { buttonCollider.enabled = true; } } //END Show
} //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