Example #1
0
        public void Update()
        {
            float playerX = Hitbox.Return().getX();
            float deltaX  = this.x - playerX;


            if (deltaX < 1400 && deltaX > -1400)
            {
                _step = _step + 1;
                if (_step > _animDrawsBetweenFrames)
                {
                    NextFrame();
                    _step = 0;

                    if (currentFrame == 2)
                    {
                        SetFrame(0);
                    }
                    movement();
                }
            }
        }