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

            hashCode = hashCode * -1521134295 + Time.GetHashCode();
            hashCode = hashCode * -1521134295 + RawAcceleration.GetHashCode();
            return(hashCode);
        }
        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);
        }
Exemple #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());
 }
Exemple #9
0
 public override int GetHashCode()
 {
     return(Acceleration.GetHashCode()
            & DeltaTime.GetHashCode());
 }
Exemple #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));
 }
Exemple #13
0
 public override int GetHashCode()
 {
     return(normal.GetHashCode() ^ dist.GetHashCode());
 }
Exemple #14
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(Center.GetHashCode());
 }
Exemple #15
0
 public override int GetHashCode()
 {
     return(_value.GetHashCode());
 }
Exemple #16
0
 public override int GetHashCode()
 {
     return(min.GetHashCode() ^ (max.GetHashCode() << 2));
 }