/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns> /// A hash code for the current <see cref="T:System.Object"/>. /// </returns> public override int GetHashCode() { unchecked { var hashCode = (int)WorkSurfaceContext; hashCode = (hashCode * 397) ^ ServerID.GetHashCode(); hashCode = (hashCode * 397) ^ ResourceID.GetHashCode(); hashCode = (hashCode * 397) ^ EnvironmentID.GetHashCode(); return(hashCode); } }
private void OnCollisionEnter(Collision other) { EnvironmentID collidedWithWhat = other.gameObject.GetComponent <EnvironmentID>(); if (!collidedWithWhat) { return; } switch (collidedWithWhat.envType) { case EnvironmentID.EnvironmentObject.FLOOR: HandleCollisionWithFloor(); break; } }
public override int GetHashCode() => EnvironmentID.GetHashCode();
public override int GetHashCode() { return(EnvironmentID.GetHashCode()); }