public void UpdateStats(OnUpdateDisplay onUpdateStats) { lblThrust.Text = (onUpdateStats.thrust_ratio * 100f).ToString("N1") + "% (" + onUpdateStats.thrust.ToString("N3") + ")"; lblHeight.Text = onUpdateStats.altitude.ToString("N1") + " m"; float speed = 3.6f * (float)Math.Sqrt(onUpdateStats.speedVector.X * onUpdateStats.speedVector.X + onUpdateStats.speedVector.Z * onUpdateStats.speedVector.Z); lblSpeed.Text = speed.ToString("N1") + " kph"; }
protected override void UpdateDisplay(RenderBatch renderBatch) { OnUpdateDisplay?.Invoke(renderBatch); var capturedBatch = new CapturedBatch(); Batches.Add(capturedBatch); for (var i = 0; i < renderBatch.UpdatedComponents.Count; i++) { ref var renderTreeDiff = ref renderBatch.UpdatedComponents.Array[i]; capturedBatch.AddDiff(renderTreeDiff); }