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); }
private void StartNextMove() { if (_data.Frames.Count <= 0) { Kill(); return; } _previousFrame = _nextFrame; _nextFrame = _data.Frames[0]; _data.Frames.RemoveAt(0); IsPointerDown = _nextFrame.Clicking; }
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(); }