Пример #1
0
        public void Update(IUpdateArgs args)
        {
            Shaders.Update(args.Camera);

            _timer += (float)args.GameTime.ElapsedGameTime.TotalSeconds;
            if (_timer >= (1.0f / _framerate))
            {
                _timer       -= 1.0f / _framerate;
                _currentFrame = (_currentFrame + 1) % Resources.Atlas.GetFrameCount();

                Shaders.SetAnimatedTextures(Resources.Atlas.GetAtlas(_currentFrame));
            }
        }