* Set error state and show error sign * 设置错误状态并显示错误标志
()
| 471 | * 设置错误状态并显示错误标志 |
| 472 | */ |
| 473 | private setErrorState(): void { |
| 474 | if (!this._showErrorSign) return; |
| 475 | |
| 476 | if (!this._errorSign) { |
| 477 | const errorSignUrl = getUIConfig('loaderErrorSign'); |
| 478 | if (errorSignUrl) { |
| 479 | this._errorSign = GLoader._errorSignPool.getObject(errorSignUrl); |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | if (this._errorSign) { |
| 484 | this._errorSign.setSize(this.width, this.height); |
| 485 | if (this._displayObject && this._errorSign.displayObject) { |
| 486 | this._displayObject.addChild(this._errorSign.displayObject); |
| 487 | } |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | /** |
| 492 | * Clear error state |
no test coverage detected