private void DrawHackingMarkers(MyHudHackingMarkers hackingMarkers) { ProfilerShort.Begin("MyGuiScreenHud.DrawHackingMarkers"); try { hackingMarkers.UpdateMarkers(); if (MySandboxGame.TotalTimeInMilliseconds % 200 > 100) { return; } foreach (var entityMarker in hackingMarkers.MarkerEntities) { MyEntity entity = entityMarker.Key; MyHudEntityParams hudParams = entityMarker.Value; if (hudParams.ShouldDraw != null && !hudParams.ShouldDraw()) { continue; } var hudParams2 = hudParams; //hudParams2.Text = new StringBuilder("sdsdff"); Vector3 position = Vector3.Transform(hudParams2.RelativePosition, (Matrix)hudParams2.Parent.WorldMatrix); m_markerRender.DrawLocationMarker( m_markerRender.GetStyleForRelation(hudParams.TargetMode), (Vector3)entity.LocationForHudMarker, hudParams2, 0, 0); } DrawTexts(); } finally { ProfilerShort.End(); } }
private void DrawLargeTurretTargets(MyHudLargeTurretTargets largeTurretTargets) { ProfilerShort.Begin("MyGuiScreenHud.DrawLargeTurretTargets"); foreach (var target in largeTurretTargets.Targets) { MyHudEntityParams hudParams = target.Value; if (hudParams.ShouldDraw != null && !hudParams.ShouldDraw()) { continue; } m_markerRender.DrawLocationMarker( m_markerRender.GetStyleForRelation(MyRelationsBetweenPlayerAndBlock.Enemies), target.Key.PositionComp.WorldAABB.Center, hudParams, 0, 0 ); } ProfilerShort.End(); }