コード例 #1
0
        public KeyFrameCursor CreateCursor()
        {
            var cursor = new KeyFrameCursor(this);

            _cursors.Add(cursor);
            return(cursor);
        }
コード例 #2
0
        public SecuenceNode Playing(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f)
        {
            KeyFramePlaybackDesc b = new KeyFramePlaybackDesc(animation, cursor, blend);

            _animations.Add(b);
            return(this);
        }
コード例 #3
0
        public KeyFrameAnimationPlayback AddAnimation(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f, float velocity = 1.0f)
        {
            var desc = new KeyFramePlaybackDesc(animation, cursor, blend, velocity);

            _animations.AddLast(desc);
            return(this);
        }
コード例 #4
0
 public KeyFramePlaybackDesc(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f, float velocity = 1.0f)
 {
     this.Animation = animation;
     this.Cursor    = cursor ?? animation.GetCursor(0);
     this.Blend     = blend;
     this.Velocity  = velocity;
 }
コード例 #5
0
        public SecuenceNode Playing(KeyFrameAnimation animation, float startTime, float duration, AnimationLooping loop, float blend = 1.0f)
        {
            KeyFrameCursor cursor = new KeyFrameCursor(animation)
            {
                StartTime = startTime,
                EndTime   = startTime + duration,
                Looping   = loop
            };
            KeyFramePlaybackDesc b = new KeyFramePlaybackDesc(animation, cursor, blend);

            _animations.Add(b);
            return(this);
        }
コード例 #6
0
        public KeyFrameAnimationPlayback AddAnimation(KeyFrameAnimation animation, float startTime, float duration, AnimationLooping loop, float blend = 1.0f, float velocity = 1.0f)
        {
            KeyFrameCursor cursor = new KeyFrameCursor(animation)
            {
                StartTime = startTime,
                EndTime   = startTime + duration,
                Looping   = loop
            };
            KeyFramePlaybackDesc b = new KeyFramePlaybackDesc(animation, cursor, blend, velocity);

            _animations.AddLast(b);
            return(this);
        }
コード例 #7
0
        public KeyFrameAnimation(string name)
            : base(name, null)
        {
            //Creates the Defaul cursor
            _cursors.Add(KeyFrameCursor.Create(this));

            _nodes = new ObservedDictionary <string, CurvesContainer>(
                itemAdded: x =>
            {
                x.Animation = this;
            },
                itemRemoved: x =>
            {
                if (x.Animation == this)
                {
                    x.Animation = null;
                }
            },
                keySelector: x => x.Name);
        }
コード例 #8
0
 public void Update(float elapsedTime, KeyFrameCursor state, float blendWeight = 1.0f, bool blended = false)
 {
     state.ValidateTime();
     Sample(state.Time, blendWeight, blended);
     state.UpdateTime(elapsedTime);
 }
コード例 #9
0
 public KeyFrameAnimationPlayback(KeyFrameAnimation animation, KeyFrameCursor cursor = null, float blend = 1.0f, float velocity = 1.0f)
 {
     AddAnimation(animation, cursor, blend, velocity);
 }