コード例 #1
0
 public void Play(T id, int startFrame, bool restart = false)
 {
     if (!Playing || !CurrentAnimID.Equals(id) || restart)
     {
         Play(id, true);
         AnimationFrame = startFrame;
         currentFrame   = currentAnim[AnimationFrame];
     }
 }
コード例 #2
0
        /*
         *  Playing animations
         */

        public void Play(T id, bool restart = false)
        {
            if (restart || (!Playing && !Finished) || !CurrentAnimID.Equals(id))
            {
                CurrentAnimID = id;
                currentAnim   = Animations[id];

                AnimationFrame = 0;
                currentFrame   = currentAnim[AnimationFrame];
                timer          = 0;

                Finished = false;
                Playing  = true;
            }
        }