Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Point.GetHashCode() * 397) ^ Normal.GetHashCode());
     }
 }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Object.GetHashCode() * 397) ^ Value.GetHashCode());
     }
 }
Exemplo n.º 3
0
        public override int GetHashCode()
        {
            int hashCode = -1216137635;

            hashCode = hashCode * -1521134295 + Time.GetHashCode();
            hashCode = hashCode * -1521134295 + RawAcceleration.GetHashCode();
            return(hashCode);
        }
Exemplo n.º 4
0
        public override int GetHashCode()
        {
            int hashCode = 1469017180;

            hashCode = hashCode * -1521134295 + singleChunk.GetHashCode();
            hashCode = hashCode * -1521134295 + chunkDistanceX.GetHashCode();
            hashCode = hashCode * -1521134295 + chunkDistanceZ.GetHashCode();
            hashCode = hashCode * -1521134295 + position.GetHashCode();
            return(hashCode);
        }
Exemplo n.º 5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Value;
         hashCode = (hashCode * 397) ^ Float3.GetHashCode();
         hashCode = (hashCode * 397) ^ (!ReferenceEquals(MaterialArray, null) ? MaterialArray.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (!ReferenceEquals(MaterialList, null) ? MaterialList.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (StringValue != null ? StringValue.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)EnumValue;
         hashCode = (hashCode * 397) ^ (!ReferenceEquals(Mat, null) ? Mat.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (!ReferenceEquals(NullObj, null) ? NullObj.GetHashCode() : 0);
         return(hashCode);
     }
 }
        public static Entity Instantiate(EntityCommandBuffer.Concurrent ecb, int jobIndex, float3 pos, Entity prefab, float time)
        {
            var entity = ecb.Instantiate(jobIndex, prefab);

            ecb.SetComponent(jobIndex, entity, new AlivePeriod {
                StartTime = time, Period = 1f,
            });

            var rot = quaternion.identity;
            var mat = new float4x4(rot, pos);

            mat.c0.w = time;
            var random = new Random((uint)pos.GetHashCode());
            var rotZ   = random.NextFloat() * math.PI * 2f;

            mat.c1.w = rotZ;
            ecb.SetComponent(jobIndex, entity, new ExplosionComponent {
                Matrix = mat,
            });
            return(entity);
        }
        public static Entity Instantiate(float3 pos)
        {
            var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
            var entity        = entityManager.Instantiate(_prefabEntity);

#if UNITY_EDITOR
            entityManager.SetName(entity, "explosion");
#endif
            entityManager.SetComponentData(entity, new AlivePeriod {
                StartTime = (float)UTJ.Time.GetCurrent(), Period = 1f,
            });

            var rot = quaternion.identity;
            var mat = new float4x4(rot, pos);
            mat.c0.w = UTJ.Time.GetCurrent();
            var random = new Random((uint)pos.GetHashCode());
            var rotZ   = random.NextFloat() * math.PI * 2f;
            mat.c1.w = rotZ;
            entityManager.SetComponentData(entity, new ExplosionComponent {
                Matrix = mat,
            });
            return(entity);
        }
 public static int Float3GetHashCode(ref float3 a)
 {
     return(a.GetHashCode());
 }
Exemplo n.º 9
0
 public override int GetHashCode()
 {
     return(Acceleration.GetHashCode()
            & DeltaTime.GetHashCode());
 }
Exemplo n.º 10
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 public static int GetHashCode(float3 v) => v.GetHashCode();
 public override int GetHashCode()
 {
     return(distance.GetHashCode() ^ (m_Normal.GetHashCode() << 2));
 }
 public override int GetHashCode()
 {
     return(center.GetHashCode() ^ (extents.GetHashCode() << 2));
 }
Exemplo n.º 13
0
 public override int GetHashCode()
 {
     return(normal.GetHashCode() ^ dist.GetHashCode());
 }
Exemplo n.º 14
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(Center.GetHashCode());
 }
Exemplo n.º 15
0
 public override int GetHashCode()
 {
     return(_value.GetHashCode());
 }
Exemplo n.º 16
0
 public override int GetHashCode()
 {
     return(min.GetHashCode() ^ (max.GetHashCode() << 2));
 }