forked from LeenkxTeam/LNXSDK
Repe [T3DU] and Moises Jpelaez updates
This commit is contained in:
@ -14,7 +14,7 @@ class Animation {
|
||||
|
||||
public var isSkinned: Bool;
|
||||
public var isSampled: Bool;
|
||||
public var action = "";
|
||||
@:isVar public var action(get, default) = "";
|
||||
#if lnx_skin
|
||||
public var armature: iron.data.Armature; // Bone
|
||||
#end
|
||||
@ -57,6 +57,10 @@ class Animation {
|
||||
play();
|
||||
}
|
||||
|
||||
function get_action(): String {
|
||||
return action;
|
||||
}
|
||||
|
||||
public function play(action = "", onComplete: Void->Void = null, blendTime = 0.0, speed = 1.0, loop = true) {
|
||||
if (blendTime > 0) {
|
||||
this.blendTime = blendTime;
|
||||
@ -98,7 +102,7 @@ class Animation {
|
||||
else {
|
||||
sampler.timeOld = sampler.time;
|
||||
sampler.offsetOld = sampler.offset;
|
||||
sampler.setTimeOnly(sampler.time + delta * sampler.speed);
|
||||
sampler.setTimeOnly(sampler.time + delta * sampler.speed * iron.system.Time.scale);
|
||||
updateActionTrack(sampler);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user