コード例 #1
0
        // Entry point to the Clip Drawing...
        public override void Draw(Rect trackRect, TrackDrawer drawer, WindowState state)
        {
            if (SelectionManager.Contains(clip))
            {
                clip.dirtyHash = 0;
            }

            // compute dirty hash, depends on the clip and the timeline
            int dirtyHash = HashUtility.CombineHash(ComputeClipHash(), state.timeAreaTranslation.GetHashCode(), state.timeAreaScale.GetHashCode(), trackRect.GetHashCode());

            // update the clip projected rectangle on the timeline
            CalculateClipRectangle(trackRect, state, dirtyHash);
            // update the blend rects (when clip overlaps with others)
            CalculateBlendRect();
            // update the loop rects (when clip loops)
            CalculateLoopRects(trackRect, state, dirtyHash);

            clip.dirtyHash = dirtyHash;

            if (drawer.canDrawExtrapolationIcon)
            {
                DrawExtrapolation(trackRect, treeViewRect);
            }

            DrawInto(treeViewRect, state);
        }
コード例 #2
0
ファイル: MarkerEditor.cs プロジェクト: 0geova0/Jam
 public override int GetHashCode()
 {
     return(HashUtility.CombineHash(
                errorText != null ? errorText.GetHashCode() : 0,
                tooltip != null ? tooltip.GetHashCode() : 0
                ));
 }
コード例 #3
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>A 32-bit signed integer that is the hash code for this instance.</returns>
 public override int GetHashCode()
 {
     return(HashUtility.CombineHash(
                position.GetHashCode(),
                startTime.GetHashCode(),
                endTime.GetHashCode()
                ));
 }
コード例 #4
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>A 32-bit signed integer that is the hash code for this instance.</returns>
 public override int GetHashCode()
 {
     return(HashUtility.CombineHash(
                errorText != null ? errorText.GetHashCode() : 0,
                tooltip != null ? tooltip.GetHashCode() : 0,
                highlightColor.GetHashCode(),
                icons != null ? icons.GetHashCode() : 0
                ));
 }
コード例 #5
0
 public override int GetHashCode()
 {
     return(HashUtility.CombineHash(
                errorText != null ? errorText.GetHashCode() : 0,
                trackColor.GetHashCode(),
                minimumHeight.GetHashCode(),
                icon != null ? icon.GetHashCode() : 0
                ));
 }
コード例 #6
0
ファイル: MarkerEditor.cs プロジェクト: 0geova0/Jam
 public override int GetHashCode()
 {
     return(HashUtility.CombineHash(
                markerRegion.GetHashCode(),
                timelineRegion.GetHashCode(),
                startTime.GetHashCode(),
                endTime.GetHashCode()
                ));
 }
コード例 #7
0
        public int BlendHash()
        {
            int num = 0;

            for (int i = 0; i < this.m_ClipGUICache.Count; i++)
            {
                TimelineClip clip = this.m_ClipGUICache[i].clip;
                num = HashUtility.CombineHash(num, (clip.duration - clip.start).GetHashCode(), clip.blendInCurveMode.GetHashCode(), clip.blendOutCurveMode.GetHashCode());
            }
            return(num);
        }
コード例 #8
0
        int BlendHash()
        {
            var hash = 0;

            foreach (var clip in track.clips)
            {
                hash = HashUtility.CombineHash(hash,
                                               (clip.duration - clip.start).GetHashCode(),
                                               ((int)clip.blendInCurveMode).GetHashCode(),
                                               ((int)clip.blendOutCurveMode).GetHashCode());
            }
            return(hash);
        }
コード例 #9
0
        public virtual void Draw(Rect trackRect, TimelineWindow.TimelineState state, TrackDrawer drawer)
        {
            if (SelectionManager.Contains(this.clip))
            {
                this.clip.dirtyHash = 0;
            }
            int num = this.ComputeDirtyHash();
            int h   = HashUtility.CombineHash(state.timeAreaTranslation.GetHashCode(), state.timeAreaScale.GetHashCode(), trackRect.GetHashCode());

            this.CalculateClipRectangle(base.parentTrackGUI.track, trackRect, state, num.CombineHash(h));
            this.CalculateBlendRect();
            this.CalculateLoopRects(trackRect, state, num);
            this.clip.dirtyHash = num;
            if (drawer.canDrawExtrapolationIcon)
            {
                this.DrawExtrapolation(trackRect, base.UnClippedRect);
            }
            this.DrawInto(base.rect, this.m_Styles.displayBackground, state);
        }
コード例 #10
0
 public int GetHashCode(EditorCurveBinding obj)
 {
     return(HashUtility.CombineHash(obj.path.GetHashCode(), obj.type.GetHashCode(), obj.propertyName.GetHashCode()));
 }
コード例 #11
0
 public int GetHashCode(AnimatorEntry obj)
 {
     return(HashUtility.CombineHash(obj.animatorID, obj.applyRootMotion.GetHashCode(), obj.humanoid.GetHashCode()));
 }
コード例 #12
0
 int ComputeClipHash()
 {
     return(HashUtility.CombineHash(clip.clipAssetDuration.GetHashCode(), clip.duration.GetHashCode(), clip.timeScale.GetHashCode(), clip.start.GetHashCode()));
 }
コード例 #13
0
 private int ComputeDirtyHash()
 {
     return(HashUtility.CombineHash(this.clip.clipAssetDuration.GetHashCode(), this.clip.duration.GetHashCode(), this.clip.timeScale.GetHashCode(), this.clip.start.GetHashCode()));
 }
コード例 #14
0
 public override int GetHashCode()
 {
     return(HashUtility.CombineHash(GroupName != null ? GroupName.GetHashCode() : 0, Type != null ? Type.GetHashCode() : 0, Path != null ? Path.GetHashCode() : 0));
 }