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