mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[phaser] Add before and after update world transforms callbacks.
This commit is contained in:
parent
5662c75db9
commit
a996baa2b0
@ -80,6 +80,8 @@ export class SpineGameObject extends ComputedSizeMixin(DepthMixin(FlipMixin(Scro
|
||||
skeleton: Skeleton;
|
||||
animationStateData: AnimationStateData;
|
||||
animationState: AnimationState;
|
||||
beforeUpdateWorldTransforms: (object: SpineGameObject) => void = () => {};
|
||||
afterUpdateWorldTransforms: (object: SpineGameObject) => void = () => {};
|
||||
private premultipliedAlpha = false;
|
||||
private _displayOriginX = 0;
|
||||
private _displayOriginY = 0;
|
||||
@ -175,7 +177,9 @@ export class SpineGameObject extends ComputedSizeMixin(DepthMixin(FlipMixin(Scro
|
||||
|
||||
this.animationState.update(delta / 1000);
|
||||
this.animationState.apply(this.skeleton);
|
||||
this.beforeUpdateWorldTransforms(this);
|
||||
this.skeleton.updateWorldTransform();
|
||||
this.afterUpdateWorldTransforms(this);
|
||||
}
|
||||
|
||||
preDestroy () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user