(
initialInstanceData: InstanceData
)
| 294 | } |
| 295 | |
| 296 | override extraInitializationFromInitialInstance( |
| 297 | initialInstanceData: InstanceData |
| 298 | ) { |
| 299 | const animator = this.getAnimator(); |
| 300 | if (initialInstanceData.numberProperties) { |
| 301 | for ( |
| 302 | let i = 0, len = initialInstanceData.numberProperties.length; |
| 303 | i < len; |
| 304 | ++i |
| 305 | ) { |
| 306 | const extraData = initialInstanceData.numberProperties[i]; |
| 307 | if (animator && extraData.name === 'animation') { |
| 308 | animator.setAnimationIndex(extraData.value); |
| 309 | } |
| 310 | } |
| 311 | } |
| 312 | if (initialInstanceData.customSize) { |
| 313 | this.setWidth(initialInstanceData.width); |
| 314 | this.setHeight(initialInstanceData.height); |
| 315 | } |
| 316 | this.setOpacity( |
| 317 | initialInstanceData.opacity === undefined |
| 318 | ? 255 |
| 319 | : initialInstanceData.opacity |
| 320 | ); |
| 321 | this.flipX(!!initialInstanceData.flippedX); |
| 322 | this.flipY(!!initialInstanceData.flippedY); |
| 323 | } |
| 324 | |
| 325 | override onDeletedFromScene(): void { |
| 326 | // Let subclasses do something before the object is destroyed. |
nothing calls this directly
no test coverage detected