Beispiel #1
0
        ValueTask updateAnimation(CanvasTimingInformation context)
        {
            _animDirection.Run(context);

            setSpriteSheetPointers();

            return(default);
Beispiel #2
0
        void updateAnimation(CanvasTimingInformation args)
        {
            if (Math.Abs(_speed) < .0001)
            {
                return;
            }

            _animDirection.Run(args);
            _frame1InSpriteMap = _framePointers[_direction].Frame1;
            _frame2InSpriteMap = _framePointers[_direction].Frame2;

            _spriteSheetPos = _animDirection.Flag ? _frame1InSpriteMap : _frame2InSpriteMap;
        }