private IEnumerator Init() { yield return(0); ModelEffectManager.Init(); //模型管理初始化处理 yield return(0); HOTween.Init(true, true, true); //初始化hotween; yield return(0); gameObject.AddComponent <FPS>();//增加FPS显示 }
public static ModelEffectManager FromBaseObject(BaseObject baseObj) { if (baseObj == null || baseObj.NativeObject == IntPtr.Zero) { return(null); } ModelEffectManager obj = baseObj as ModelEffectManager; if (object.Equals(obj, null)) { obj = new ModelEffectManager(CreatedWhenConstruct.CWC_NotToCreate); obj.BindNativeObject(baseObj.NativeObject, "CModelEffectManager"); obj.IncreaseCast(); } return(obj); }
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 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); }
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); }
private void UpdateBornEffect() { _modelAlpha += 0.3f; ModelEffectManager.ChangeAlpha(GoCloth, _modelAlpha); }
public void RemoveWhiteColor() { ModelEffectManager.RemovePuleColor(GoCloth); }
public void ShowWhiteColor() { ModelEffectManager.ShowPuleColor(GoCloth); }
public void EndModelColorEffect() { ModelEffectManager.RemoveSpriteColorEffect(GoCloth); }
public BaseObject Create() { ModelEffectManager emptyInstance = new ModelEffectManager(CreatedWhenConstruct.CWC_NotToCreate); return(emptyInstance); }