MCPcopy Create free account
hub / github.com/esengine/esengine / syncProperties

Method syncProperties

packages/fairygui/src/ecs/FGUIComponent.ts:370–384  ·  view source on GitHub ↗

* Update component properties from ECS data * 从 ECS 数据更新组件属性

()

Source from the content-addressed store, hash-verified

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

Callers 2

createComponentMethod · 0.95
updateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected