Exemplo n.º 1
0
        private static string calcHash(DCustomEquipment data, Color backgroundColor, Color penguinColor)
        {
            StructHash structHash = default(StructHash);

            structHash.Combine(data.GetFullHash());
            structHash.Combine(backgroundColor);
            structHash.Combine(penguinColor);
            return(Convert.ToString(structHash));
        }
Exemplo n.º 2
0
        public int GetFullHash()
        {
            StructHash sh = default(StructHash);

            sh.Combine <int>(this.LodLevel);
            for (int i = 0; i < this.Equipment.Length; i++)
            {
                sh.Combine <int>(this.Equipment[i].GetFullHash());
            }
            return(sh);
        }
Exemplo n.º 3
0
        public int GetFullHash()
        {
            StructHash structHash = default(StructHash);

            structHash.Combine(LodLevel);
            for (int i = 0; i < Equipment.Length; i++)
            {
                structHash.Combine(Equipment[i].GetFullHash());
            }
            return(structHash);
        }
        public int GetHash()
        {
            StructHash sh = default(StructHash);

            for (int i = 0; i < this.Bones.Length; i++)
            {
                sh.Combine <string>(this.Bones[i].Name);
                sh.Combine <Vector3>(this.Bones[i].Position);
                sh.Combine <Quaternion>(this.Bones[i].Rotation);
                sh.Combine <int>(this.Bones[i].ChildCount);
            }
            return(sh);
        }
Exemplo n.º 5
0
        public int GetResourceHash()
        {
            StructHash structHash = default(StructHash);

            structHash.Combine(Name ?? string.Empty);
            if (Parts != null)
            {
                for (int i = 0; i < Parts.Length; i++)
                {
                    structHash.Combine(Parts[i].GetResourceHash());
                }
            }
            return(structHash);
        }
        public int GetResourceHash()
        {
            StructHash sh = default(StructHash);

            sh.Combine <string>(this.Name ?? string.Empty);
            if (this.Parts != null)
            {
                for (int i = 0; i < this.Parts.Length; i++)
                {
                    sh.Combine <int>(this.Parts[i].GetResourceHash());
                }
            }
            return(sh);
        }
        public int GetFullHash()
        {
            StructHash structHash = default(StructHash);

            structHash.Combine(SlotIndex);
            if (Decals != null)
            {
                for (int i = 0; i < Decals.Length; i++)
                {
                    structHash.Combine(Decals[i].GetFullHash());
                }
            }
            return(structHash);
        }
        public int GetFullHash()
        {
            StructHash sh = default(StructHash);

            sh.Combine <int>(this.SlotIndex);
            if (this.Decals != null)
            {
                for (int i = 0; i < this.Decals.Length; i++)
                {
                    sh.Combine <int>(this.Decals[i].GetFullHash());
                }
            }
            return(sh);
        }
        public int GetResourceHash()
        {
            StructHash sh = default(StructHash);

            sh.Combine <string>(this.TextureName ?? string.Empty);
            return(sh);
        }
Exemplo n.º 10
0
    public static int GetValueHashCode <T>(this T[] o) where T : struct
    {
        StructHash structHash = default(StructHash);

        structHash.Combine(o);
        return(structHash);
    }
        public int GetFullHash()
        {
            StructHash sh = default(StructHash);

            sh.Combine <EquipmentDecalType>(this.Type);
            sh.Combine <string>(this.TextureName ?? string.Empty);
            sh.Combine <int>(this.DefinitionId);
            sh.Combine <int>(this.Index);
            sh.Combine <float>(this.Scale);
            sh.Combine <float>(this.Uoffset);
            sh.Combine <float>(this.Voffset);
            sh.Combine <float>(this.Rotation);
            sh.Combine <bool>(this.Repeat);
            return(sh);
        }
Exemplo n.º 12
0
        public int GetFullHash()
        {
            StructHash structHash = default(StructHash);

            structHash.Combine(Type);
            structHash.Combine(TextureName ?? string.Empty);
            structHash.Combine(DefinitionId);
            structHash.Combine(Index);
            structHash.Combine(Scale);
            structHash.Combine(Uoffset);
            structHash.Combine(Voffset);
            structHash.Combine(Rotation);
            structHash.Combine(Repeat);
            return(structHash);
        }
Exemplo n.º 13
0
        public static int GetHash(this Mesh mesh)
        {
            StructHash structHash = default(StructHash);

            structHash.Combine(mesh.bindposes);
            structHash.Combine(mesh.blendShapeCount);
            structHash.Combine(mesh.boneWeights);
            structHash.Combine(mesh.bounds);
            structHash.Combine(mesh.colors32);
            structHash.Combine(mesh.normals);
            structHash.Combine(mesh.subMeshCount);
            for (int i = 0; i < mesh.subMeshCount; i++)
            {
                structHash.Combine(mesh.GetIndices(i));
            }
            structHash.Combine(mesh.tangents);
            structHash.Combine(mesh.triangles);
            structHash.Combine(mesh.uv);
            structHash.Combine(mesh.uv2);
            structHash.Combine(mesh.uv3);
            structHash.Combine(mesh.uv4);
            structHash.Combine(mesh.vertexCount);
            structHash.Combine(mesh.vertices);
            return(structHash);
        }