mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 16:48:43 +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;
|
||||
UpdateAnimationStatus(deltaTime);
|
||||
|
||||
if (updateMode == UpdateMode.OnlyAnimationStatus) {
|
||||
state.ApplyEventTimelinesOnly(skeleton, issueEvents: false);
|
||||
if (updateMode == UpdateMode.OnlyAnimationStatus)
|
||||
return;
|
||||
}
|
||||
ApplyAnimation();
|
||||
}
|
||||
|
||||
@ -243,9 +241,14 @@ namespace Spine.Unity {
|
||||
deltaTime *= timeScale;
|
||||
state.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)
|
||||
_BeforeApply(this);
|
||||
|
||||
|
||||
@ -353,10 +353,8 @@ namespace Spine.Unity {
|
||||
return;
|
||||
UpdateAnimationStatus(deltaTime);
|
||||
|
||||
if (updateMode == UpdateMode.OnlyAnimationStatus) {
|
||||
state.ApplyEventTimelinesOnly(skeleton, issueEvents: false);
|
||||
if (updateMode == UpdateMode.OnlyAnimationStatus)
|
||||
return;
|
||||
}
|
||||
ApplyAnimation();
|
||||
}
|
||||
|
||||
@ -382,9 +380,14 @@ namespace Spine.Unity {
|
||||
deltaTime *= timeScale;
|
||||
state.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)
|
||||
BeforeApply(this);
|
||||
|
||||
@ -396,7 +399,7 @@ namespace Spine.Unity {
|
||||
AfterAnimationApplied();
|
||||
}
|
||||
|
||||
public void AfterAnimationApplied () {
|
||||
public virtual void AfterAnimationApplied () {
|
||||
if (UpdateLocal != null)
|
||||
UpdateLocal(this);
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ namespace Spine.Unity {
|
||||
ApplyAnimation();
|
||||
}
|
||||
|
||||
protected void ApplyAnimation () {
|
||||
public virtual void ApplyAnimation () {
|
||||
if (_BeforeApply != null)
|
||||
_BeforeApply(this);
|
||||
|
||||
@ -152,7 +152,7 @@ namespace Spine.Unity {
|
||||
AfterAnimationApplied();
|
||||
}
|
||||
|
||||
public void AfterAnimationApplied () {
|
||||
public virtual void AfterAnimationApplied () {
|
||||
if (_UpdateLocal != null)
|
||||
_UpdateLocal(this);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user