Exemple #1
0
        public void Start(AnimContext animContext)
        {
            if (animContext != null)
            {
                _animQueue.Enqueue(animContext);
            }
            if (InAnimation)
            {
                return;
            }

            if (_animQueue.Count > 0)
            {
                animContext = _animQueue.Dequeue();
                if (_beginUpdator != null)
                {
                    _beginUpdator(animContext);
                }

                _animContext = animContext;
                float frames = animContext.Duration / 1000f * (float)frameRate;
                //Debug.WriteLine(string.Format("frames: {0}", frames));
                Delta       = animContext.Change / frames;
                InAnimation = true;
                Begin       = 0f;
            }
        }
Exemple #2
0
 public void Clear()
 {
     _animContext = null;
     _animQueue.Clear();
 }