现在动画暂停时可以 setProgress 了 & 修复 boltCaught 在切枪时不播放的问题

This commit is contained in:
286799714
2024-11-09 02:24:41 +08:00
parent a521aa31ff
commit 24536538b1
3 changed files with 3 additions and 5 deletions

1
.gitignore vendored
View File

@@ -22,6 +22,7 @@ eclipse
run
test
logs
.luarc.json
# Files from Forge MDK
forge*changelog.txt

View File

@@ -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;
}

View File

@@ -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