private int CalculateSettingsHash() { unchecked { int hashCode = 0; for (int i = 0; i < corners.Count; i++) { if (corners[i] != null) { hashCode = (hashCode * 397) ^ corners[i].localPosition.GetHashCode(); } } hashCode = (hashCode * 397) ^ radius.GetHashCode(); hashCode = (hashCode * 397) ^ makeRenderers.GetHashCode(); hashCode = (hashCode * 397) ^ transform.childCount.GetHashCode(); hashCode = (hashCode * 397) ^ heigth.GetHashCode(); hashCode = (hashCode * 397) ^ depth.GetHashCode(); hashCode = (hashCode * 397) ^ extraWidth.GetHashCode(); hashCode = (hashCode * 397) ^ invert.GetHashCode(); hashCode = (hashCode * 397) ^ loop.GetHashCode(); hashCode = (hashCode * 397) ^ gameObject.layer.GetHashCode(); hashCode = (hashCode * 397) ^ isTrigger.GetHashCode(); hashCode = (hashCode * 397) ^ copyTag.GetHashCode(); if (copyTag) { hashCode = (hashCode * 397) ^ gameObject.tag.GetHashCode(); } hashCode = (hashCode * 397) ^ gameObject.isStatic.GetHashCode(); hashCode = (hashCode * 397) ^ GameObjectUtility.GetStaticEditorFlags(gameObject).GetHashCode(); hashCode = (hashCode * 397) ^ ((physicsMaterial) ? physicsMaterial.GetHashCode() : 0); hashCode = (hashCode * 397) ^ DEBUG.GetHashCode(); return(hashCode); } }
public static Tween TweenBounciness(this PhysicMaterial material, float to, float duration) => Tweening.To(getter: () => material.bounciness, setter: bounciness => material.bounciness = bounciness, to, duration).SetId(material.GetHashCode());
public static Tween TweenStaticFriction(this PhysicMaterial material, float to, float duration) => Tweening.To(getter: () => material.staticFriction, setter: friction => material.staticFriction = friction, to, duration).SetId(material.GetHashCode());