mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[as3] AnimationState#apply returns boolean indicating if any timeline was applied. #919
This commit is contained in:
parent
b5e08f59e1
commit
0eaf8fcfa0
Binary file not shown.
@ -147,15 +147,17 @@ package spine.animation {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function apply(skeleton : Skeleton) : void {
|
||||
public function apply(skeleton : Skeleton) : Boolean {
|
||||
if (skeleton == null) throw new ArgumentError("skeleton cannot be null.");
|
||||
if (animationsChanged) _animationsChanged();
|
||||
|
||||
var events : Vector.<Event> = this.events;
|
||||
var applied : Boolean = false;
|
||||
|
||||
for (var i : int = 0, n : int = tracks.length; i < n; i++) {
|
||||
var current : TrackEntry = tracks[i];
|
||||
if (current == null || current.delay > 0) continue;
|
||||
applied = true;
|
||||
|
||||
// Apply mixing from entries first.
|
||||
var mix : Number = current.alpha;
|
||||
@ -194,6 +196,7 @@ package spine.animation {
|
||||
}
|
||||
|
||||
queue.drain();
|
||||
return applied;
|
||||
}
|
||||
|
||||
private function applyMixingFrom(to : TrackEntry, skeleton : Skeleton) : Number {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user