示例#1
0
文件: Obj.cs 项目: robotii/Wren.NET
        public override int GetHashCode()
        {
            switch (Type)
            {
            case ObjType.Num:
                return(Num.GetHashCode());

            case ObjType.Obj:
                return(base.GetHashCode());

            default:
                return(Type.GetHashCode());
            }
        }
示例#2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PositionX != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionX);
            }
            if (PositionY != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionY);
            }
            if (Direction != 0)
            {
                hash ^= Direction.GetHashCode();
            }
            if (ObjType != 0)
            {
                hash ^= ObjType.GetHashCode();
            }
            if (BlockType != 0)
            {
                hash ^= BlockType.GetHashCode();
            }
            if (DishType != 0)
            {
                hash ^= DishType.GetHashCode();
            }
            if (ToolType != 0)
            {
                hash ^= ToolType.GetHashCode();
            }
            if (TriggerType != 0)
            {
                hash ^= TriggerType.GetHashCode();
            }
            if (IsMoving != false)
            {
                hash ^= IsMoving.GetHashCode();
            }
            if (RecieveText.Length != 0)
            {
                hash ^= RecieveText.GetHashCode();
            }
            if (Team != 0)
            {
                hash ^= Team.GetHashCode();
            }
            if (SightRange != 0)
            {
                hash ^= SightRange.GetHashCode();
            }
            if (MoveSpeed != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MoveSpeed);
            }
            if (MaxThrowDistance != 0)
            {
                hash ^= MaxThrowDistance.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PositionX != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionX);
            }
            if (PositionY != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionY);
            }
            if (Width != 0)
            {
                hash ^= Width.GetHashCode();
            }
            if (Height != 0)
            {
                hash ^= Height.GetHashCode();
            }
            if (Direction != 0)
            {
                hash ^= Direction.GetHashCode();
            }
            if (ObjType != 0)
            {
                hash ^= ObjType.GetHashCode();
            }
            if (BlockType != 0)
            {
                hash ^= BlockType.GetHashCode();
            }
            if (DishType != 0)
            {
                hash ^= DishType.GetHashCode();
            }
            if (ToolType != 0)
            {
                hash ^= ToolType.GetHashCode();
            }
            if (TriggerType != 0)
            {
                hash ^= TriggerType.GetHashCode();
            }
            if (IsMoving != false)
            {
                hash ^= IsMoving.GetHashCode();
            }
            hash ^= buff_.GetHashCode();
            if (SpeakText.Length != 0)
            {
                hash ^= SpeakText.GetHashCode();
            }
            if (Team != 0)
            {
                hash ^= Team.GetHashCode();
            }
            if (SightRange != 0)
            {
                hash ^= SightRange.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }