mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-11 18:11:12 +08:00
actually checking if is lodaded in base game, not sprite component, in order to match the documentation
This commit is contained in:
@@ -217,6 +217,9 @@ abstract class BaseGame extends Game {
|
|||||||
/// It translates the camera unless hud, call the render method and restore the canvas.
|
/// It translates the camera unless hud, call the render method and restore the canvas.
|
||||||
/// This makes sure the canvas is not messed up by one component and all components render independently.
|
/// This makes sure the canvas is not messed up by one component and all components render independently.
|
||||||
void renderComponent(Canvas canvas, Component c) {
|
void renderComponent(Canvas canvas, Component c) {
|
||||||
|
if (!c.loaded()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!c.isHud()) {
|
if (!c.isHud()) {
|
||||||
canvas.translate(-camera.x, -camera.y);
|
canvas.translate(-camera.x, -camera.y);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user