mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Add is skeleton loaded condition.
This commit is contained in:
parent
2e37fb3855
commit
34bd5a1479
@ -33,6 +33,11 @@
|
|||||||
"id": "is-flipped-x",
|
"id": "is-flipped-x",
|
||||||
"scriptName": "IsFlippedX",
|
"scriptName": "IsFlippedX",
|
||||||
"isTrigger": false
|
"isTrigger": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "is-skeleton-loaded",
|
||||||
|
"scriptName": "IsSkeletonLoaded",
|
||||||
|
"isTrigger": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"actions": [
|
"actions": [
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
|
|
||||||
import type { SDKInstanceClass } from "./instance.ts";
|
import type { SDKInstanceClass as SpineC3Instance } from "./instance.ts";
|
||||||
|
|
||||||
const C3 = globalThis.C3;
|
const C3 = globalThis.C3;
|
||||||
|
|
||||||
C3.Plugins.EsotericSoftware_SpineConstruct3.Cnds =
|
C3.Plugins.EsotericSoftware_SpineConstruct3.Cnds =
|
||||||
{
|
{
|
||||||
OnSkeletonLoaded (this: SDKInstanceClass) {
|
OnSkeletonLoaded (this: SpineC3Instance) {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
OnAnimationEvent (this: SDKInstanceClass, event: string, track: number, animation: string) {
|
OnAnimationEvent (this: SpineC3Instance, event: string, track: number, animation: string) {
|
||||||
console.log(this.triggeredEventName === event
|
console.log(this.triggeredEventName === event
|
||||||
&& this.triggeredEventTrack === track
|
&& this.triggeredEventTrack === track
|
||||||
&& this.triggeredEventAnimation === animation);
|
&& this.triggeredEventAnimation === animation);
|
||||||
@ -16,7 +16,10 @@ C3.Plugins.EsotericSoftware_SpineConstruct3.Cnds =
|
|||||||
&& this.triggeredEventTrack === track
|
&& this.triggeredEventTrack === track
|
||||||
&& this.triggeredEventAnimation === animation;
|
&& this.triggeredEventAnimation === animation;
|
||||||
},
|
},
|
||||||
IsFlippedX (this: SDKInstanceClass) {
|
IsFlippedX (this: SpineC3Instance) {
|
||||||
return this.propFlipX;
|
return this.propFlipX;
|
||||||
},
|
},
|
||||||
|
IsSkeletonLoaded (this: SpineC3Instance) {
|
||||||
|
return this.skeletonLoaded;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -103,6 +103,11 @@
|
|||||||
"list-name": "Is flipped X",
|
"list-name": "Is flipped X",
|
||||||
"display-text": "Is flipped X",
|
"display-text": "Is flipped X",
|
||||||
"description": "Check if the skeleton is flipped horizontally"
|
"description": "Check if the skeleton is flipped horizontally"
|
||||||
|
},
|
||||||
|
"is-skeleton-loaded": {
|
||||||
|
"list-name": "Is skeleton loaded",
|
||||||
|
"display-text": "Is skeleton loaded",
|
||||||
|
"description": "Check if the skeleton has finished loading"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"actions": {
|
"actions": {
|
||||||
|
|||||||
@ -103,6 +103,11 @@
|
|||||||
"list-name": "是否水平翻转",
|
"list-name": "是否水平翻转",
|
||||||
"display-text": "是否水平翻转",
|
"display-text": "是否水平翻转",
|
||||||
"description": "检查骨架是否水平翻转"
|
"description": "检查骨架是否水平翻转"
|
||||||
|
},
|
||||||
|
"is-skeleton-loaded": {
|
||||||
|
"list-name": "骨架是否已加载",
|
||||||
|
"display-text": "骨架是否已加载",
|
||||||
|
"description": "检查骨架是否已完成加载"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"actions": {
|
"actions": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user