Add engio for character animation

This commit is contained in:
2024-02-07 15:59:17 -05:00
parent c0416cffe9
commit 21a1cf688f
2 changed files with 17 additions and 2 deletions

View File

@@ -12,9 +12,19 @@
// //
// Nothing. // Nothing.
// //
// KIND_PLAN: // KIND_CHOOSE:
// //
// Name of a callback function, in plaintext. // Name of a callback function, in plaintext. The function name
// is sanity checked. First, we ensure that it begins with the
// prefix "cb_." Then we regenerate the gui, and verify that the
// gui has the specified callback as an option.
//
// KIND_ENGIO:
//
// First, a function name is read from the datapack. The function
// name must be a lua function inside class "engio". The function
// is called with arguments: actor, place, and then additional
// arguments of simple dynamic type read from the datapack.
// //
// KIND_LUA: // KIND_LUA:
// //

View File

@@ -58,3 +58,8 @@ function engio.myfunction(actor, place, a, b, c)
pprint("B:", b) pprint("B:", b)
pprint("C:", c) pprint("C:", c)
end end
function engio.moveto(actor, place, action, xyz)
-- todo: sanity check the action and xyz.
tangible.animate(actor, nil, {action=action, xyz=xyz})
end