mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-25 22:58:47 +07:00
allow modded planets to customize drawing
This commit is contained in:
parent
5ee4101ba4
commit
97b0461d7f
@ -110,8 +110,10 @@ public class PlanetRenderer implements Disposable{
|
||||
}
|
||||
|
||||
private void renderPlanet(Planet planet){
|
||||
if(!planet.visible()) return;
|
||||
|
||||
//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);
|
||||
|
||||
|
@ -264,4 +264,12 @@ public class Planet extends UnlockableContent{
|
||||
public ContentType getContentType(){
|
||||
return ContentType.planet;
|
||||
}
|
||||
|
||||
public boolean visible(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public void draw(Mat3D projection, Mat3d Transform){
|
||||
mesh.render(projection, transform);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user