* Update component properties from ECS data * 从 ECS 数据更新组件属性
()
| 368 | * 从 ECS 数据更新组件属性 |
| 369 | */ |
| 370 | public syncProperties(): void { |
| 371 | if (!this._component) return; |
| 372 | |
| 373 | if (this.width > 0) { |
| 374 | this._component.width = this.width; |
| 375 | } |
| 376 | if (this.height > 0) { |
| 377 | this._component.height = this.height; |
| 378 | } |
| 379 | this._component.x = this.x; |
| 380 | this._component.y = this.y; |
| 381 | this._component.visible = this.visible; |
| 382 | this._component.alpha = this.alpha; |
| 383 | this._component.sortingOrder = this.sortingOrder; |
| 384 | } |
| 385 | |
| 386 | /** |
| 387 | * Dispose and cleanup |
no outgoing calls
no test coverage detected