static public int ColorToInt(BlockButtonColor c) { int retVal = 0; retVal |= Mathf.RoundToInt(c.r * 255f) << 24; retVal |= Mathf.RoundToInt(c.g * 255f) << 16; retVal |= Mathf.RoundToInt(c.b * 255f) << 8; retVal |= Mathf.RoundToInt(c.a * 255f); return retVal; }
public override int GetHashCode() { return BlockButtonColor.ColorToInt(this); }
public override bool Equals(object other) { BlockButtonColor c = (BlockButtonColor)other; return (this == c); }