Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Extensions/Spine/spineruntimeobject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ namespace gdjs {

readonly spineResourceName: string;

static isHitBoxesUpdateDisabled = false;

/**
* @param instanceContainer The container the object belongs to.
* @param objectData The object data used to initialize the object
Expand All @@ -74,6 +76,10 @@ namespace gdjs {
this.setAnimationIndex(0);
this._renderer.updateAnimation(0);

if (SpineRuntimeObject.isHitBoxesUpdateDisabled) {
this.hitBoxes.length = 0;
}

// *ALWAYS* call `this.onCreated()` at the very end of your object constructor.
this.onCreated();
}
Expand Down Expand Up @@ -183,6 +189,14 @@ namespace gdjs {
}
}

updateHitBoxes(): void {
if (SpineRuntimeObject.isHitBoxesUpdateDisabled) {
return;
}

super.updateHitBoxes();
}

extraInitializationFromInitialInstance(
initialInstanceData: InstanceData
): void {
Expand Down