allow modded planets to customize drawing
This commit is contained in:
@@ -110,8 +110,10 @@ public class PlanetRenderer implements Disposable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void renderPlanet(Planet planet){
|
private void renderPlanet(Planet planet){
|
||||||
|
if(!planet.visible()) return;
|
||||||
|
|
||||||
//render planet at offsetted position in the world
|
//render planet at offsetted position in the world
|
||||||
planet.mesh.render(cam.combined, planet.getTransform(mat));
|
planet.render(cam.combined, planet.getTransform(mat));
|
||||||
|
|
||||||
renderOrbit(planet);
|
renderOrbit(planet);
|
||||||
|
|
||||||
|
|||||||
@@ -264,4 +264,12 @@ public class Planet extends UnlockableContent{
|
|||||||
public ContentType getContentType(){
|
public ContentType getContentType(){
|
||||||
return ContentType.planet;
|
return ContentType.planet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean visible(){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void draw(Mat3D projection, Mat3d Transform){
|
||||||
|
mesh.render(projection, transform);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user