升级6.4.升级水,升级天气

This commit is contained in:
2026-04-05 00:26:54 +08:00
parent 63bc9b5536
commit 5f7cbfb713
635 changed files with 34718 additions and 22567 deletions

View File

@@ -132,6 +132,25 @@ namespace WaveHarmonic.Crest.Editor
}
}
[DrawGizmo(GizmoType.Selected)]
static void DrawGizmos(LevelLodInput target, GizmoType type)
{
if (!target.Enabled) return;
if (target.Data is not LodInputData data) return;
var bounds = data.Bounds;
if (target.OverrideHeight)
{
var minimum = target.HeightRange.x;
var maximum = target.HeightRange.y;
bounds.size = bounds.size.XNZ(Mathf.Abs(minimum - maximum));
bounds.center = bounds.center.XNZ(Mathf.Lerp(minimum, maximum, 0.5f));
}
bounds.GizmosDraw();
}
[DrawGizmo(GizmoType.Selected)]
static void DrawWatertightHullGizmos(WatertightHull target, GizmoType type)
{
@@ -317,9 +336,12 @@ namespace WaveHarmonic.Crest.Editor
[DrawGizmo(GizmoType.Selected | GizmoType.NonSelected)]
static void DrawGizmos(WaterChunkRenderer target, GizmoType type)
{
if (target._DrawRenderBounds)
if ((target._DrawRenderBounds || type.HasFlag(GizmoType.Selected)) && target.Rend != null)
{
Gizmos.color = type.HasFlag(GizmoType.Selected) ? Color.green : Color.white;
Handles.Label(target.transform.position, $"{target._LodIndex},{target._SiblingIndex}");
target.Rend.bounds.GizmosDraw();
Gizmos.color = Color.white;
}
if (!type.HasFlag(GizmoType.Selected))
@@ -327,11 +349,6 @@ namespace WaveHarmonic.Crest.Editor
return;
}
if (target.Rend != null)
{
target.Rend.bounds.GizmosDraw();
}
if (WaterBody.WaterBodies.Count > 0)
{
Gizmos.color = Color.green;