private IEnumerator ShowModelColorEffect() { while (Time.time - _startTime < 0.6f) { var curColor = new Color { a = Random.Range(_startColor.a, _endColor.a), b = Random.Range(_startColor.b, _endColor.b), r = Random.Range(_startColor.r, _endColor.r), g = Random.Range(_startColor.g, _endColor.g) }; if (GoCloth == null) { break; } ModelEffectManager.ShowSpriteColorEffect(GoCloth, curColor); yield return(0); } ModelEffectManager.RemoveSpriteColorEffect(GoCloth); yield return(0); }
public IEnumerator ShowWarningEffect() { while (Time.time - _warnStartTime < _timeLength) { var curColor = new Color { a = Random.Range(_warnStartColor.a, _warnEndColor.a), b = Random.Range(_warnStartColor.b, _warnEndColor.b), r = Random.Range(_warnStartColor.r, _warnEndColor.r), g = Random.Range(_warnStartColor.g, _warnEndColor.g) }; if (GoCloth == null) { break; } ModelEffectManager.ShowSpriteColorEffect(GoCloth, curColor); yield return(0); } ModelEffectManager.RemoveSpriteColorEffect(GoCloth); yield return(0); }
private IEnumerator ShowModelBeAttackedEffect() { ModelEffectManager.ShowSpriteColorEffect(GoCloth, ColorConst.BeAttackStep1Color); yield return(0); ModelEffectManager.ShowSpriteColorEffect(GoCloth, ColorConst.BeAttackStep1Color); yield return(0); ModelEffectManager.ShowSpriteColorEffect(GoCloth, ColorConst.BeAttackStep2Color); yield return(0); ModelEffectManager.ShowSpriteColorEffect(GoCloth, ColorConst.BeAttackStep2Color); yield return(0); ModelEffectManager.ShowSpriteColorEffect(GoCloth, ColorConst.RedEnd); while (_keepFrame < 8) { _keepFrame++; yield return(0); } yield return(0); _keepFrame = 0; ModelEffectManager.ShowSpriteColorEffect(GoCloth, ColorConst.BeAttackStep2Color); yield return(0); ModelEffectManager.ShowSpriteColorEffect(GoCloth, ColorConst.BeAttackStep2Color); yield return(0); ModelEffectManager.ShowSpriteColorEffect(GoCloth, ColorConst.BeAttackStep1Color); yield return(0); ModelEffectManager.ShowSpriteColorEffect(GoCloth, ColorConst.BeAttackStep1Color); yield return(0); ModelEffectManager.RemoveSpriteColorEffect(GoCloth); yield return(0); }