mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 19:11:36 +08:00
Merge pull request #344 from pharan/patch-1
[C#] Optional fix for firing events when mixing This allows previous animations to fire its events during mixing/crossfading. To maintain consistency across runtimes, this fix code is commented out. To use it, remove the old line and uncomment the fix line.
This commit is contained in:
commit
9a7aeb1ae0
@ -114,7 +114,10 @@ namespace Spine {
|
||||
} else {
|
||||
float previousTime = previous.time;
|
||||
if (!previous.loop && previousTime > previous.endTime) previousTime = previous.endTime;
|
||||
previous.animation.Apply(skeleton, previousTime, previousTime, previous.loop, null);
|
||||
previous.animation.Apply(skeleton, previous.lastTime, previousTime, previous.loop, null);
|
||||
// Remove the line above, and uncomment the line below, to allow previous animations to fire events during mixing.
|
||||
//previous.animation.Apply(skeleton, previous.lastTime, previousTime, previous.loop, events);
|
||||
previous.lastTime = previousTime;
|
||||
|
||||
float alpha = current.mixTime / current.mixDuration * current.mix;
|
||||
if (alpha >= 1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user