Exemplo n.º 1
0
 private MockScreenInput.Frame CreateMove(Vector3 pos, float time, bool clicking)
 {
     MockScreenInput.Frame newMove = new MockScreenInput.Frame();
     newMove.Position = pos;
     newMove.Time     = time;
     newMove.Clicking = clicking;
     return(newMove);
 }
Exemplo n.º 2
0
 private void StartNextMove()
 {
     if (_data.Frames.Count <= 0)
     {
         Kill();
         return;
     }
     _previousFrame = _nextFrame;
     _nextFrame     = _data.Frames[0];
     _data.Frames.RemoveAt(0);
     IsPointerDown = _nextFrame.Clicking;
 }
Exemplo n.º 3
0
        public void PlayInput(MockScreenInput mockInput, System.Action playCompleteCallback, float startTime)
        {
            if (mockInput == null)
            {
                Debug.LogError("Mock Input cannot be null");
                return;
            }

            _data                 = mockInput.Clone();
            _startTime            = startTime;
            _nextFrame            = new MockScreenInput.Frame(0f, Vector2.zero, false);
            _playCompleteCallback = playCompleteCallback;
            _running              = true;

            StartNextMove();
        }