mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 18:26:12 +08:00
Minor changes.
This commit is contained in:
parent
9512e56a3d
commit
01c0e1881f
@ -404,8 +404,6 @@ void _spColorTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, f
|
||||
|
||||
if (time < self->frames[0]) return; /* Time is before first frame. */
|
||||
|
||||
slot = skeleton->slots[self->slotIndex];
|
||||
|
||||
if (time >= self->frames[self->framesCount - 5]) {
|
||||
/* Time is after last frame. */
|
||||
int i = self->framesCount - 1;
|
||||
@ -429,6 +427,7 @@ void _spColorTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, f
|
||||
b = lastFrameB + (self->frames[frameIndex + COLOR_FRAME_B] - lastFrameB) * percent;
|
||||
a = lastFrameA + (self->frames[frameIndex + COLOR_FRAME_A] - lastFrameA) * percent;
|
||||
}
|
||||
slot = skeleton->slots[self->slotIndex];
|
||||
if (alpha < 1) {
|
||||
slot->r += (r - slot->r) * alpha;
|
||||
slot->g += (g - slot->g) * alpha;
|
||||
|
||||
@ -361,8 +361,6 @@ namespace Spine {
|
||||
float[] frames = this.frames;
|
||||
if (time < frames[0]) return; // Time is before first frame.
|
||||
|
||||
Slot slot = skeleton.slots[slotIndex];
|
||||
|
||||
float r, g, b, a;
|
||||
if (time >= frames[frames.Length - 5]) {
|
||||
// Time is after last frame.
|
||||
@ -387,6 +385,7 @@ namespace Spine {
|
||||
b = lastFrameB + (frames[frameIndex + FRAME_B] - lastFrameB) * percent;
|
||||
a = lastFrameA + (frames[frameIndex + FRAME_A] - lastFrameA) * percent;
|
||||
}
|
||||
Slot slot = skeleton.slots[slotIndex];
|
||||
if (alpha < 1) {
|
||||
slot.r += (r - slot.r) * alpha;
|
||||
slot.g += (g - slot.g) * alpha;
|
||||
|
||||
@ -419,8 +419,6 @@ public class Animation {
|
||||
float[] frames = this.frames;
|
||||
if (time < frames[0]) return; // Time is before first frame.
|
||||
|
||||
Color color = skeleton.slots.get(slotIndex).color;
|
||||
|
||||
float r, g, b, a;
|
||||
if (time >= frames[frames.length - 5]) {
|
||||
// Time is after last frame.
|
||||
@ -445,6 +443,7 @@ public class Animation {
|
||||
b = prevFrameB + (frames[frameIndex + FRAME_B] - prevFrameB) * percent;
|
||||
a = prevFrameA + (frames[frameIndex + FRAME_A] - prevFrameA) * percent;
|
||||
}
|
||||
Color color = skeleton.slots.get(slotIndex).color;
|
||||
if (alpha < 1)
|
||||
color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user