Пример #1
0
 public void GoToTick(int delta)
 {
     if (button.enabled)
     {
         _timeContext.ReplaceJumpInTime(_timeContext.jumpInTime.targetTick + delta);
     }
 }
Пример #2
0
 public void GoToTick()
 {
     if (playhead.enabled)
     {
         _timeContext.ReplaceJumpInTime((int)playhead.value);
     }
 }
Пример #3
0
    void SyncInput()
    {
        List <StoredInput> testList = new List <StoredInput> ();

        for (int i = 0; i < syncInputHistory.Count; i++)
        {
            InputSnapshot snapshot = new InputSnapshot();
            snapshot.Copy(syncInputHistory[i].snapshot);

            testList.Add(new StoredInput(
                             syncInputHistory[i].tick,
                             syncInputHistory[i].playerID,
                             snapshot));
        }

        _inputContext.ReplaceInputHistory(testList);

        if (_timeContext.tick.value < lockstepTick)
        {
            _timeContext.ReplaceJumpInTime(lockstepTick);
        }
    }