Initial flame_lua_runtime package
This commit is contained in:
17
example/assets/games/flight/scripts/animation.lua
Normal file
17
example/assets/games/flight/scripts/animation.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
---@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.55,
|
||||
onComplete = "piece_move_done"
|
||||
})
|
||||
end
|
||||
|
||||
function animation.toast(text)
|
||||
return commands.toast(text)
|
||||
end
|
||||
|
||||
return animation
|
||||
Reference in New Issue
Block a user