public void PlayHurtEffect() { if ((this.hurtCurve != null) && this.CheckMats()) { SMaterialEffect_Curve curve = this.FindOrCreateEffect <SMaterialEffect_Curve>(0); if (curve.curve == null) { curve.curve = this.hurtCurve; curve.paramName = "_HurtColor"; curve.enableKeyword = "_HURT_EFFECT_ON"; curve.disableKeyword = "_HURT_EFFECT_OFF"; curve.Play(); } } }
public void PlayHurtEffect() { if (this.hurtCurve == null) { return; } if (!this.CheckMats()) { return; } SMaterialEffect_Curve sMaterialEffect_Curve = this.FindOrCreateEffect <SMaterialEffect_Curve>(0); if (sMaterialEffect_Curve.curve != null) { return; } sMaterialEffect_Curve.curve = this.hurtCurve; sMaterialEffect_Curve.paramName = "_HurtColor"; sMaterialEffect_Curve.shaderKeyword = "_HURT_EFFECT_ON"; sMaterialEffect_Curve.Play(); }