9 public abstract class Distorter : MonoBehaviour, IComparable<Distorter>
13 protected int distortOrder = 0;
16 protected float distortStrength = 1f;
36 if (!isActiveAndEnabled) {
40 strength = Mathf.Clamp01 (strength * DistortStrength);
47 return DistortPointInternal(point, strength);
59 if (!isActiveAndEnabled) {
63 strength = Mathf.Clamp01(strength * DistortStrength);
65 return DistortScaleInternal(scale, strength);
74 protected abstract Vector3 DistortPointInternal(Vector3 point,
float strength);
82 protected abstract Vector3 DistortScaleInternal(Vector3 point,
float strength);
94 public float DistortStrength
96 get {
return distortStrength; }
97 set { distortStrength = Mathf.Clamp01(value); }
100 public int DistortOrder
102 get {
return distortOrder; }
103 set { distortOrder = value; }