mirror of
https://github.com/sys-32Dev/TACZ.git
synced 2026-08-08 20:06:25 +00:00
现在动画暂停时可以 setProgress 了 & 修复 boltCaught 在切枪时不播放的问题
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,6 +22,7 @@ eclipse
|
||||
run
|
||||
test
|
||||
logs
|
||||
.luarc.json
|
||||
|
||||
# Files from Forge MDK
|
||||
forge*changelog.txt
|
||||
|
||||
@@ -218,7 +218,7 @@ public class AnimationStateContext {
|
||||
var stateMachine = checkStateMachine();
|
||||
ObjectAnimationRunner runner = stateMachine.getAnimationController().getAnimation(track);
|
||||
if (runner != null) {
|
||||
if (runner.isRunning()) {
|
||||
if (runner.isRunning() || runner.isPausing()) {
|
||||
if (normalization) {
|
||||
progress = runner.getAnimation().getMaxEndTimeS() * progress;
|
||||
}
|
||||
|
||||
@@ -87,10 +87,6 @@ function bolt_caught_states.bolt_caught.entry(context)
|
||||
context:runAnimation("static_bolt_caught", context:getTrack(STATIC_TRACK_LINE, BOLT_CAUGHT_TRACK), false, LOOP, 0)
|
||||
end
|
||||
|
||||
function bolt_caught_states.bolt_caught.exit(context)
|
||||
context:stopAnimation(context:getTrack(STATIC_TRACK_LINE, BOLT_CAUGHT_TRACK))
|
||||
end
|
||||
|
||||
function bolt_caught_states.bolt_caught.update(context)
|
||||
if (not isNoAmmo(context)) then
|
||||
context:trigger(bolt_caught_states.normal.input)
|
||||
@@ -99,6 +95,7 @@ end
|
||||
|
||||
function bolt_caught_states.bolt_caught.transition(context, input)
|
||||
if (input == bolt_caught_states.normal.input) then
|
||||
context:stopAnimation(context:getTrack(STATIC_TRACK_LINE, BOLT_CAUGHT_TRACK))
|
||||
return bolt_caught_states.normal
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user