Beyond_Beyaan.Data_Modules.BBSprite.Update C# (CSharp) Method

Update() public method

public Update ( float time, Random r ) : void
time float
r System.Random
return void
        public void Update(float time, Random r)
        {
            if (!_animated)
            {
                return;
            }
            _frameTimer -= time;
            if (_frameTimer <= 0)
            {
                //Advance to next frame
                _currentFrame++;
                if (_currentFrame >= _baseSprite.Frames.Count)
                {
                    _currentFrame = 0;
                }
                _frameTimer = Utility.GetIntValue(_baseSprite.FrameLength[_currentFrame], r) / 1000.0f;
            }
        }