Files
2026-06-07 22:53:58 +08:00

38 lines
769 B
Lua

---@type RuntimeCommands
local commands = runtime.import("runtime_commands")
local animation = {}
function animation.move_piece(piece_id, path)
return commands.move_path(piece_id, path, {
duration = 0.7,
onComplete = "piece_move_done"
})
end
function animation.toast(text)
return commands.toast(text)
end
function animation.play_sound(name)
return commands.play_sound(name)
end
function animation.play_bgm(name, channel)
return commands.play_bgm(name, { channel = channel or "bgm" })
end
function animation.pause_bgm(channel)
return commands.pause_bgm(channel)
end
function animation.resume_bgm(channel)
return commands.resume_bgm(channel)
end
function animation.stop_bgm(channel)
return commands.stop_bgm(channel)
end
return animation