mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Code and method signature cleanup (made ApplyAnimation and AfterAnimationApplied public virtual).
This commit is contained in:
parent
ba54db2751
commit
f029c1d4fd
@ -232,10 +232,8 @@ namespace Spine.Unity {
|
|||||||
return;
|
return;
|
||||||
UpdateAnimationStatus(deltaTime);
|
UpdateAnimationStatus(deltaTime);
|
||||||
|
|
||||||
if (updateMode == UpdateMode.OnlyAnimationStatus) {
|
if (updateMode == UpdateMode.OnlyAnimationStatus)
|
||||||
state.ApplyEventTimelinesOnly(skeleton, issueEvents: false);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
ApplyAnimation();
|
ApplyAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,9 +241,14 @@ namespace Spine.Unity {
|
|||||||
deltaTime *= timeScale;
|
deltaTime *= timeScale;
|
||||||
state.Update(deltaTime);
|
state.Update(deltaTime);
|
||||||
skeleton.Update(deltaTime);
|
skeleton.Update(deltaTime);
|
||||||
|
|
||||||
|
if (updateMode == UpdateMode.OnlyAnimationStatus) {
|
||||||
|
state.ApplyEventTimelinesOnly(skeleton, issueEvents: false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ApplyAnimation () {
|
public virtual void ApplyAnimation () {
|
||||||
if (_BeforeApply != null)
|
if (_BeforeApply != null)
|
||||||
_BeforeApply(this);
|
_BeforeApply(this);
|
||||||
|
|
||||||
|
|||||||
@ -353,10 +353,8 @@ namespace Spine.Unity {
|
|||||||
return;
|
return;
|
||||||
UpdateAnimationStatus(deltaTime);
|
UpdateAnimationStatus(deltaTime);
|
||||||
|
|
||||||
if (updateMode == UpdateMode.OnlyAnimationStatus) {
|
if (updateMode == UpdateMode.OnlyAnimationStatus)
|
||||||
state.ApplyEventTimelinesOnly(skeleton, issueEvents: false);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
ApplyAnimation();
|
ApplyAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,9 +380,14 @@ namespace Spine.Unity {
|
|||||||
deltaTime *= timeScale;
|
deltaTime *= timeScale;
|
||||||
state.Update(deltaTime);
|
state.Update(deltaTime);
|
||||||
skeleton.Update(deltaTime);
|
skeleton.Update(deltaTime);
|
||||||
|
|
||||||
|
if (updateMode == UpdateMode.OnlyAnimationStatus) {
|
||||||
|
state.ApplyEventTimelinesOnly(skeleton, issueEvents: false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ApplyAnimation () {
|
public virtual void ApplyAnimation () {
|
||||||
if (BeforeApply != null)
|
if (BeforeApply != null)
|
||||||
BeforeApply(this);
|
BeforeApply(this);
|
||||||
|
|
||||||
@ -396,7 +399,7 @@ namespace Spine.Unity {
|
|||||||
AfterAnimationApplied();
|
AfterAnimationApplied();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AfterAnimationApplied () {
|
public virtual void AfterAnimationApplied () {
|
||||||
if (UpdateLocal != null)
|
if (UpdateLocal != null)
|
||||||
UpdateLocal(this);
|
UpdateLocal(this);
|
||||||
|
|
||||||
|
|||||||
@ -127,7 +127,7 @@ namespace Spine.Unity {
|
|||||||
ApplyAnimation();
|
ApplyAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ApplyAnimation () {
|
public virtual void ApplyAnimation () {
|
||||||
if (_BeforeApply != null)
|
if (_BeforeApply != null)
|
||||||
_BeforeApply(this);
|
_BeforeApply(this);
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ namespace Spine.Unity {
|
|||||||
AfterAnimationApplied();
|
AfterAnimationApplied();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AfterAnimationApplied () {
|
public virtual void AfterAnimationApplied () {
|
||||||
if (_UpdateLocal != null)
|
if (_UpdateLocal != null)
|
||||||
_UpdateLocal(this);
|
_UpdateLocal(this);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user