示例#1
0
文件: Scene.cs 项目: daithyy/DSAA-CA
        public void UpdateAnimation(GameTime gameTime)
        {
            // Track how much time has passed ...
            frameTime += gameTime.ElapsedGameTime;

            // If it's greater than the frame time then move to the next frame ...
            if (frameTime.Milliseconds >= FrameSpeed)
            {
                Texture = Textures.Dequeue();
                Textures.Enqueue(Texture);
                frameTime = TimeSpan.Zero;
            }
        }