コード例 #1
0
 void FixedUpdate()
 {
     if (Vehicle)
     {
         _input.ApplyInput();
     }
 }
コード例 #2
0
 private void Predict()
 {
     foreach (var playerAction in _inputManager.Inputs())
     {
         PlayerInput.ApplyInput(gameObject, playerAction);
     }
 }
コード例 #3
0
 // Update is called once per frame
 private void FixedUpdate()
 {
     lock (_inputManager) {
         foreach (var playerAction in _inputManager.Inputs())
         {
             if (!ServerGameManager.Instance.IsPlayerDead(GetComponent <OtherPlayer>().id))
             {
                 _lastAppliedInput = PlayerInput.ApplyInput(gameObject, playerAction);
             }
         }
         _inputManager.EmptyAll(_lastAppliedInput);
         LastState = new PlayerPosition(Time.time, transform.position, _lastAppliedInput, GetComponent <Health> ().GetCurrentHealth());
     }
 }