소스 검색

Fixes unwanted drawcalls when spritemanagers are empty

David Catuhe 6 년 전
부모
커밋
a798d98118
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/Sprites/spriteManager.ts

+ 2 - 1
src/Sprites/spriteManager.ts

@@ -303,7 +303,8 @@ export class SpriteManager implements ISpriteManager {
      */
     public render(): void {
         // Check
-        if (!this._effectBase.isReady() || !this._effectFog.isReady() || !this._spriteTexture || !this._spriteTexture.isReady()) {
+        if (!this._effectBase.isReady() || !this._effectFog.isReady() || !this._spriteTexture
+            || !this._spriteTexture.isReady() || !this.sprites.length) {
             return;
         }