예제 #1
0
 internal int Hash()
 {
     return(HashUtility.CombineHash(m_Start.GetHashCode(),
                                    m_Duration.GetHashCode(),
                                    m_TimeScale.GetHashCode(),
                                    m_ClipIn.GetHashCode(),
                                    ((int)m_PreExtrapolationMode).GetHashCode(),
                                    ((int)m_PostExtrapolationMode).GetHashCode()));
 }
예제 #2
0
        public static int GetClipHash(List <AnimationClip> clips)
        {
            int hash = 0;

            foreach (var clip in clips)
            {
                var stats = AnimationUtility.GetAnimationClipStats(clip);
                hash = HashUtility.CombineHash(hash, clip.GetHashCode(), stats.clips, stats.size, stats.totalCurves);
            }
            return(hash);
        }
예제 #3
0
        int ITimelineItem.Hash()
        {
            int arg_6D_0              = this.m_Start.GetHashCode();
            int arg_6D_1              = this.m_Duration.GetHashCode();
            int arg_6D_2              = this.m_TimeScale.GetHashCode();
            int arg_6D_3              = this.m_ClipIn.GetHashCode();
            int preExtrapolationMode  = (int)this.m_PreExtrapolationMode;
            int arg_6D_4              = preExtrapolationMode.GetHashCode();
            int postExtrapolationMode = (int)this.m_PostExtrapolationMode;

            return(HashUtility.CombineHash(arg_6D_0, arg_6D_1, arg_6D_2, arg_6D_3, arg_6D_4, postExtrapolationMode.GetHashCode()));
        }
예제 #4
0
        int ITimelineItem.Hash()
        {
            int hashCode              = this.m_Start.GetHashCode();
            int hashCode2             = this.m_Duration.GetHashCode();
            int hashCode3             = this.m_TimeScale.GetHashCode();
            int hashCode4             = this.m_ClipIn.GetHashCode();
            int preExtrapolationMode  = (int)this.m_PreExtrapolationMode;
            int hashCode5             = preExtrapolationMode.GetHashCode();
            int postExtrapolationMode = (int)this.m_PostExtrapolationMode;

            return(HashUtility.CombineHash(hashCode, hashCode2, hashCode3, hashCode4, hashCode5, postExtrapolationMode.GetHashCode()));
        }
예제 #5
0
        protected internal virtual void UpdateDuration()
        {
            int h   = (!(this.m_AnimClip != null)) ? 0 : ((int)(this.m_AnimClip.frameRate * this.m_AnimClip.length));
            int num = HashUtility.CombineHash(this.GetClipsHash(), this.GetMarkerHash(), h);

            if (num != this.m_ItemsHash)
            {
                this.m_ItemsHash = num;
                double num2;
                double num3;
                this.GetSequenceTime(out num2, out num3);
                this.m_Start = (DiscreteTime)num2;
                this.m_End   = (DiscreteTime)(num2 + num3);
                this.CalculateExtrapolationTimes();
            }
        }
예제 #6
0
 protected internal virtual int CalculateItemsHash()
 {
     return(HashUtility.CombineHash(GetClipsHash(), GetAnimationClipHash(m_Curves), GetTimeRangeHash()));
 }
예제 #7
0
 public int GetHashCode(AnimatorEntry obj)
 {
     return(HashUtility.CombineHash(obj.animatorID, obj.applyRootMotion.GetHashCode(), obj.humanoid.GetHashCode()));
 }
예제 #8
0
 public static int CombineHash(int h1, int h2, int h3, int h4, int h5, int h6, int h7)
 {
     return(HashUtility.CombineHash(h1, h2, h3, h4, h5, h6).CombineHash(h7));
 }
예제 #9
0
 public static int CombineHash(int h1, int h2, int h3, int h4, int h5)
 {
     return(HashUtility.CombineHash(h1, h2, h3, h4).CombineHash(h5));
 }