mirror of
https://github.com/Xevion/Rebirth.git
synced 2025-12-11 02:08:21 -06:00
planet rendering
This commit is contained in:
@@ -22,12 +22,14 @@ public class PlanetEditor : Editor
|
||||
return;
|
||||
}
|
||||
|
||||
var changed = false;
|
||||
|
||||
// Check if size changed
|
||||
var newSize = EditorGUILayout.Slider("Size", planet.Size, 1f, 300f);
|
||||
if (newSize != planet.Size)
|
||||
{
|
||||
planet.Size = newSize;
|
||||
planet.GenerateLine();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
// Check if bulbs changed
|
||||
@@ -35,7 +37,7 @@ public class PlanetEditor : Editor
|
||||
if (newBulbs != planet.Bulbs)
|
||||
{
|
||||
planet.Bulbs = newBulbs;
|
||||
planet.GenerateLine();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
// Check if edge width changed
|
||||
@@ -43,9 +45,11 @@ public class PlanetEditor : Editor
|
||||
if (newEdgeWidth != planet.edgeWidth)
|
||||
{
|
||||
planet.edgeWidth = newEdgeWidth;
|
||||
planet.GenerateLine();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (changed) planet.Render();
|
||||
|
||||
DrawDefaultInspector();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user