Beispiel #1
0
        public async Task EndShiftAsync(int x, int y)
        {
            var transform = await ShiftAsync(x, y);

            _shift      = transform;
            _shiftStart = null;
            _cancellationTokenSource.Cancel();
        }
Beispiel #2
0
        private ShiftTransform2D DequeueLastTransform()
        {
            ShiftTransform2D result = null;

            while (_transformsQueue.TryDequeue(out var transform))
            {
                result = transform;
            }

            return(result);
        }
Beispiel #3
0
        public void FromScene2Ds(Scene2Ds container)
        {
            if (container.Transform.ToTransform2D() is ShiftTransform2D shiftTransform)
            {
                _shift = shiftTransform;
            }

            _primitives = container.Primitives.Select(x => x.ToPrimitive2D()).ToList();
            ApplyTransform(_shift);
            CreateRenderingFrames();
        }
Beispiel #4
0
 public void SetShift(Vector2D shift)
 {
     _shift = new ShiftTransform2D(shift.X, shift.Y);
 }