public BulletStateData BulletUpdate() { inputsToProcess = inputBuffer.Get(); foreach (var input in inputsToProcess) { InputTick = input.InputTick; BulletState = bulletController.GetNextFrameData(input, BulletState); } transform.localPosition = BulletState.Position; return(BulletState); }
private void FixedUpdate() { //Debug.Log($"GameManager:FixedUpdate {ClientTick}"); ClientTick++; var dataToProcess = buffer.Get(); //Debug.Log($"processing {dataToProcess.Length} updates"); foreach (var data in dataToProcess) { UpdateClientGameState(data); } while (bulletResponses.Count > 0) { var bullet = bulletResponses.Dequeue(); SpawnBullet(bullet); } }