mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 03:15:43 +08:00
more api options
This commit is contained in:
@ -75,7 +75,7 @@ class SpriteComponent extends PositionComponent {
|
||||
|
||||
@override
|
||||
render(Canvas canvas) {
|
||||
if (sprite.loaded() && x != null && y != null) {
|
||||
if (sprite != null && sprite.loaded() && x != null && y != null) {
|
||||
prepareCanvas(canvas);
|
||||
sprite.render(canvas, width, height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user