static public Begin ( GameObject go, float duration, Color color ) : TweenColor, | ||
go | GameObject | |
duration | float | |
color | Color | |
return | TweenColor, |
protected virtual void OnPress(bool isPressed) { if (!this.mInitDone) { this.Init(); } if (base.enabled) { TweenColor.Begin(this.tweenTarget, this.duration, !isPressed ? (!UICamera.IsHighlighted(base.gameObject) ? this.mColor : this.hover) : this.pressed); } }
private void newCellColor(int stroka, int stolbec) { for (int i = 0; i < controller.cells.Length; i++) { if (int.Parse(controller.cells [i].name.Substring(4, 1)) == stroka && int.Parse(controller.cells [i].name.Substring(5, 1)) == stolbec) { TweenColor.Begin(controller.cells [i], 0.2f, Color.green); break; } } }
private void OnHover(Boolean p_isOver) { if (!m_isButton) { return; } if (!m_selected) { TweenColor.Begin(m_classIcon.gameObject, 0.1f, (!p_isOver) ? m_pBackgroundNormalColor : m_hoverColor); } }
protected virtual void OnPress(bool isPressed) { if (enabled) { if (!mStarted) { Start(); } TweenColor.Begin(tweenTarget, duration, isPressed ? pressed : mColor); } }
public virtual void OnPress(bool isPressed) { if (base.enabled) { if (!this.mStarted) { this.Start(); } TweenColor.Begin(this.tweenTarget, this.duration, !isPressed ? (!UICamera.IsHighlighted(base.gameObject) ? this.mColor : this.hover) : this.pressed); } }
protected override void OnPress(bool isPressed) { if (enabled) { if (!mStarted) { Start(); } TweenColor.Begin(tweenTarget, duration, isPressed ? pressed : (UICamera.IsHighlighted(receiver) ? hover : mColor)); } }
protected virtual void OnPress(bool isPressed) { if (!mInitDone) { Init(); } if (enabled) { TweenColor.Begin(tweenTarget, duration, isPressed ? pressed : (UICamera.IsHighlighted(gameObject) ? hover : mColor)); } }
protected virtual void OnDragOver() { if (enabled) { if (!mStarted) { Awake(); } TweenColor.Begin(tweenTarget, duration, pressed); } }
void OnPress(bool isPressed) { if (!mInitDone) { Init(); } if (enabled) { TweenColor.Begin(tweenTarget, duration, isPressed ? pressed : mColor); } }
public virtual void OnPress(bool isPressed) { if (base.enabled) { if (!mStarted) { Start(); } TweenColor.Begin(tweenTarget, duration, isPressed ? pressed : ((!UICamera.IsHighlighted(base.gameObject)) ? mColor : hover)); } }
protected virtual void OnHover(bool isOver) { if (enabled) { if (!mStarted) { Start(); } TweenColor.Begin(tweenTarget, duration, isOver ? hover : mColor); } }
public static void TweenColorBegin(GameObject go, float duration, float a) { UIWidget[] mWidgets = go.GetComponentsInChildren <UIWidget>(); foreach (UIWidget mWidget in mWidgets) { TweenColor.Begin( mWidget.gameObject, duration, new Color(mWidget.color.r, mWidget.color.g, mWidget.color.b, a)); } }
void OnHover(bool isOver) { if (!mInitDone) { Init(); } if (enabled) { TweenColor.Begin(tweenTarget, duration, isOver ? hover : mColor); } }
public virtual void OnPress(bool isPressed) { if (enabled) { if (!mStarted) { Start(); } TweenColor.Begin(tweenTarget, duration, isPressed ? pressed : (UICamera.IsHighlighted(gameObject) ? hover : mColor)); } }
void OnPress(bool _isPressed) { if (_isPressed) { TweenColor.Begin(gameObject, m_duration, Color.gray); } else { TweenColor.Begin(gameObject, m_duration, Color.white); } }
/// <summary> /// 目前是自动战斗不受VIP限定 /// </summary> IEnumerator VipOpenAuto() { StopCoroutine("FadeOut"); SpeedTips.gameObject.SetActive(true); SpeedTips.text = Core.Data.stringManager.getString(51); SpeedTips.color = new Color(1f, 1f, 1f, 0f); TweenColor.Begin(SpeedTips.gameObject, 0.1f, Color.white); yield return(new WaitForSeconds(1f)); StartCoroutine("FadeOut"); }
protected virtual void OnDragOut() { if (enabled) { if (!mStarted) { Start(); } TweenColor.Begin(tweenTarget, duration, mColor); } }
/// <summary> /// Update the button's color to either enabled or disabled state. /// </summary> public void UpdateColor(bool shouldBeEnabled) { float duration = 0.2f; foreach (UIWidget tweenTarget_ in _widgetColors.Keys) { if (tweenTarget_ != null && NGUITools.GetActive(tweenTarget_.gameObject)) { TweenColor.Begin(tweenTarget_.gameObject, duration, shouldBeEnabled ? _widgetColors[tweenTarget_]: disabledColor); } } }
private void OnHover(Boolean p_isOver) { m_isHovered = p_isOver; if (m_selected) { TweenColor.Begin(m_BG.gameObject, 0.1f, (!p_isOver) ? m_selectionColor : m_selectionHoverColor); } else { TweenColor.Begin(m_BG.gameObject, 0.1f, (!p_isOver) ? m_pBackgroundNormalColor : m_hoverColor); } }
public void PlayHighlight() { if (m_isPlayingHighlight) { return; } m_isPlayingHighlight = true; Color bgColor = m_sprBG.color; m_sprBG.color = Color.gray; TweenColor.Begin(m_sprBG.cachedGameObject, 0.3f, bgColor).SetOnFinished(() => m_isPlayingHighlight = false); }
public void SetSelected(Boolean p_selected) { m_selected = p_selected; if (m_selected) { TweenColor.Begin(m_selectBackground.gameObject, 0.1f, (!m_isHovered) ? m_selectionColor : m_selectionHoverColor); } else { TweenColor.Begin(m_selectBackground.gameObject, 0.1f, (!m_isHovered) ? m_notSelectedColor : m_hoverColor); } }
/// <summary> /// Fade out or fade in the checkmark and notify the target of OnChecked event. /// </summary> public void Set(bool state) { if (!mStarted) { mChecked = state; startsChecked = state; if (checkSprite != null) { checkSprite.alpha = state ? 1f : 0f; } } else if (mChecked != state) { // Uncheck all other checkboxes if (radioButtonRoot != null && state) { UICheckbox[] cbs = radioButtonRoot.GetComponentsInChildren <UICheckbox>(true); for (int i = 0, imax = cbs.Length; i < imax; ++i) { UICheckbox cb = cbs[i]; if (cb != this && cb.radioButtonRoot == radioButtonRoot) { cb.Set(false); } } } // Remember the state mChecked = state; // Tween the color of the checkmark if (checkSprite != null) { Color c = checkSprite.color; c.a = mChecked ? 1f : 0f; TweenColor.Begin(checkSprite.gameObject, 0.2f, c); } // Send out the event notification if (eventReceiver != null && !string.IsNullOrEmpty(functionName)) { current = this; eventReceiver.SendMessage(functionName, mChecked, SendMessageOptions.DontRequireReceiver); } // Play the checkmark animation if (checkAnimation != null) { ActiveAnimation.Play(checkAnimation, state ? Direction.Forward : Direction.Reverse); } } }
protected virtual void OnHover(bool isOver) { if (base.enabled) { if (!this.mInitDone) { this.Init(); } TweenColor.Begin(this.tweenTarget, this.duration, (!isOver ? this.mColor : this.hover)); this.mHighlighted = isOver; } }
public virtual void OnHover(bool isOver) { if (base.enabled) { if (!this.mStarted) { this.Start(); } TweenColor.Begin(this.tweenTarget, this.duration, !isOver ? this.mColor : this.hover); this.mHighlighted = isOver; } }
IEnumerator fadeOutJoystick() { yield return(new WaitForSeconds(fadeOutDelay)); foreach (UIWidget widget in widgetsToFade) { Color lastColor = widget.color; Color newColor = lastColor; newColor.a = fadeOutAlpha; TweenColor.Begin(widget.gameObject, 0.5f, newColor).method = UITweener.Method.EaseOut; } }
protected override UITweener startCloseEffectInternal(GameObject widget) { if (widget.GetComponent <UIWidget>() != null) { TweenColor tc = TweenColor.Begin(widget, duration, fadeFrom); tc.style = UITweener.Style.Once; tc.from = fadeTo; return(tc as UITweener); } return(null); }
public virtual void OnHover(bool isOver) { if (enabled) { if (!mStarted) { Start(); } TweenColor.Begin(tweenTarget, duration, isOver ? hover : mColor); mHighlighted = isOver; } }
protected virtual void OnHover(bool isOver) { if (enabled) { if (!mInitDone) { Init(); } TweenColor.Begin(tweenTarget, duration, isOver ? hover : mColor); mHighlighted = isOver; } }
public void SetSelected(ERace p_race) { m_selected = (m_race == p_race); if (m_selected) { TweenColor.Begin(m_BG.gameObject, 0.1f, (!m_isHovered) ? m_selectionColor : m_selectionHoverColor); } else { TweenColor.Begin(m_BG.gameObject, 0.1f, (!m_isHovered) ? m_pBackgroundNormalColor : m_hoverColor); } }
public void TweenLeftTimeColor() { if (m_bTweenColor) { m_bTweenColor = false; if (MyHead.HourGlassLeftTime) { TweenColor tc = TweenColor.Begin(MyHead.HourGlassLeftTime.gameObject, 0.5f, Color.red); tc.style = UITweener.Style.PingPong; } } }