mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-25 22:23:42 +08:00
Remove SetIgnoreGlobalTimeScale action and respective expression added in 61b2b029.
The same result can be achieved with "Set ignore global time scale" system action.
This commit is contained in:
parent
0f671e1cca
commit
a4b93c6d68
@ -300,17 +300,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "set-ignore-global-time-scale",
|
|
||||||
"scriptName": "SetIgnoreGlobalTimeScale",
|
|
||||||
"highlight": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"id": "ignore-global-time-scale",
|
|
||||||
"type": "boolean"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "set-animation-time",
|
"id": "set-animation-time",
|
||||||
"scriptName": "SetAnimationTime",
|
"scriptName": "SetAnimationTime",
|
||||||
@ -846,12 +835,6 @@
|
|||||||
"highlight": false,
|
"highlight": false,
|
||||||
"returnType": "number"
|
"returnType": "number"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "ignore-global-time-scale",
|
|
||||||
"expressionName": "IgnoreGlobalTimeScale",
|
|
||||||
"highlight": false,
|
|
||||||
"returnType": "number"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "current-animation-start",
|
"id": "current-animation-start",
|
||||||
"expressionName": "CurrentAnimationStart",
|
"expressionName": "CurrentAnimationStart",
|
||||||
|
|||||||
@ -89,10 +89,6 @@ C3.Plugins.EsotericSoftware_SpineConstruct3.Acts =
|
|||||||
this.setAnimationSpeed(timeScale);
|
this.setAnimationSpeed(timeScale);
|
||||||
},
|
},
|
||||||
|
|
||||||
SetIgnoreGlobalTimeScale (this: SDKInstanceClass, ignoreGlobalTimeScale: boolean) {
|
|
||||||
this.ignoreGlobalTimeScale = ignoreGlobalTimeScale;
|
|
||||||
},
|
|
||||||
|
|
||||||
SetAnimationTime (this: SDKInstanceClass, track: number, time: number, units: 0 | 1) {
|
SetAnimationTime (this: SDKInstanceClass, track: number, time: number, units: 0 | 1) {
|
||||||
this.setAnimationTime(units, time, track);
|
this.setAnimationTime(units, time, track);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -116,10 +116,6 @@ C3.Plugins.EsotericSoftware_SpineConstruct3.Exps =
|
|||||||
return this.state?.timeScale ?? 1;
|
return this.state?.timeScale ?? 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
IgnoreGlobalTimeScale (this: SpineC3Instance) {
|
|
||||||
return this.ignoreGlobalTimeScale ? 1 : 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
CurrentAnimationStart (this: SpineC3Instance, trackIndex: number) {
|
CurrentAnimationStart (this: SpineC3Instance, trackIndex: number) {
|
||||||
const track = this.state?.tracks[trackIndex];
|
const track = this.state?.tracks[trackIndex];
|
||||||
return track?.animationStart ?? 0;
|
return track?.animationStart ?? 0;
|
||||||
|
|||||||
@ -77,14 +77,10 @@ class SpineC3Instance extends globalThis.ISDKWorldInstanceBase {
|
|||||||
skeletonLoading = false;
|
skeletonLoading = false;
|
||||||
skeleton?: Skeleton;
|
skeleton?: Skeleton;
|
||||||
state?: AnimationState;
|
state?: AnimationState;
|
||||||
ignoreGlobalTimeScale = false;
|
|
||||||
|
|
||||||
public triggeredEventTrack = -1;
|
public triggeredEventTrack = -1;
|
||||||
public triggeredEventAnimation = "";
|
public triggeredEventAnimation = "";
|
||||||
public triggeredEventName = "";
|
public triggeredEventName = "";
|
||||||
public triggeredEventData?: Event & { track: number, animation: string };
|
public triggeredEventData?: Event & { track: number, animation: string };
|
||||||
|
|
||||||
private time = new spine.TimeKeeper();
|
|
||||||
private assetLoader: AssetLoader;
|
private assetLoader: AssetLoader;
|
||||||
private skeletonRenderer?: C3RendererRuntime;
|
private skeletonRenderer?: C3RendererRuntime;
|
||||||
private matrix: C3Matrix;
|
private matrix: C3Matrix;
|
||||||
@ -159,8 +155,6 @@ class SpineC3Instance extends globalThis.ISDKWorldInstanceBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_tick (): void {
|
_tick (): void {
|
||||||
this.time.update();
|
|
||||||
|
|
||||||
const { renderer } = this;
|
const { renderer } = this;
|
||||||
|
|
||||||
if (!renderer) return;
|
if (!renderer) return;
|
||||||
@ -185,7 +179,7 @@ class SpineC3Instance extends globalThis.ISDKWorldInstanceBase {
|
|||||||
|
|
||||||
this.updateCollisionSprite();
|
this.updateCollisionSprite();
|
||||||
|
|
||||||
if (this.isPlaying) this.update(this.ignoreGlobalTimeScale ? this.time.delta : this.dt);
|
if (this.isPlaying) this.update(this.dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
private update (delta: number) {
|
private update (delta: number) {
|
||||||
|
|||||||
@ -379,17 +379,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"set-ignore-global-time-scale": {
|
|
||||||
"list-name": "Set ignore global time scale",
|
|
||||||
"display-text": "Set ignore global time scale to {0}",
|
|
||||||
"description": "Set whether this instance ignores the global time scale set in Construct 3",
|
|
||||||
"params": {
|
|
||||||
"ignore-global-time-scale": {
|
|
||||||
"name": "Ignore global time scale",
|
|
||||||
"desc": "True to ignore the global time scale, false to use it."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"set-animation-time": {
|
"set-animation-time": {
|
||||||
"list-name": "Set animation time",
|
"list-name": "Set animation time",
|
||||||
"display-text": "Set track {0} animation time to {1} ({2})",
|
"display-text": "Set track {0} animation time to {1} ({2})",
|
||||||
@ -920,10 +909,6 @@
|
|||||||
"description": "Get the current animation time scale (speed multiplier).",
|
"description": "Get the current animation time scale (speed multiplier).",
|
||||||
"translated-name": "TimeScale"
|
"translated-name": "TimeScale"
|
||||||
},
|
},
|
||||||
"ignore-global-time-scale": {
|
|
||||||
"description": "Get whether this instance ignores the global time scale (1 = ignoring, 0 = not ignoring).",
|
|
||||||
"translated-name": "IgnoreGlobalTimeScale"
|
|
||||||
},
|
|
||||||
"current-animation-start": {
|
"current-animation-start": {
|
||||||
"description": "Get the start time of the current animation on the specified track.",
|
"description": "Get the start time of the current animation on the specified track.",
|
||||||
"translated-name": "CurrentAnimationStart",
|
"translated-name": "CurrentAnimationStart",
|
||||||
|
|||||||
@ -379,17 +379,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"set-ignore-global-time-scale": {
|
|
||||||
"list-name": "设置忽略全局时间缩放",
|
|
||||||
"display-text": "将忽略全局时间缩放设置为{0}",
|
|
||||||
"description": "设置此实例是否忽略Construct 3中设置的全局时间缩放",
|
|
||||||
"params": {
|
|
||||||
"ignore-global-time-scale": {
|
|
||||||
"name": "忽略全局时间缩放",
|
|
||||||
"desc": "设置为true则忽略全局时间缩放,设置为false则使用全局时间缩放。"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"set-animation-time": {
|
"set-animation-time": {
|
||||||
"list-name": "设置动画时间",
|
"list-name": "设置动画时间",
|
||||||
"display-text": "将轨道{0}的动画时间设置为{1}({2})",
|
"display-text": "将轨道{0}的动画时间设置为{1}({2})",
|
||||||
@ -920,10 +909,6 @@
|
|||||||
"description": "获取当前动画时间缩放(速度倍数)。",
|
"description": "获取当前动画时间缩放(速度倍数)。",
|
||||||
"translated-name": "TimeScale"
|
"translated-name": "TimeScale"
|
||||||
},
|
},
|
||||||
"ignore-global-time-scale": {
|
|
||||||
"description": "获取此实例是否忽略全局时间缩放(1 = 忽略,0 = 不忽略)。",
|
|
||||||
"translated-name": "IgnoreGlobalTimeScale"
|
|
||||||
},
|
|
||||||
"current-animation-start": {
|
"current-animation-start": {
|
||||||
"description": "获取指定轨道上当前动画的开始时间。",
|
"description": "获取指定轨道上当前动画的开始时间。",
|
||||||
"translated-name": "CurrentAnimationStart",
|
"translated-name": "CurrentAnimationStart",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user