Add engio for character animation
This commit is contained in:
@@ -12,10 +12,20 @@
|
||||
//
|
||||
// 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:
|
||||
//
|
||||
// A block of lua source code, in plaintext.
|
||||
|
||||
@@ -58,3 +58,8 @@ function engio.myfunction(actor, place, a, b, c)
|
||||
pprint("B:", b)
|
||||
pprint("C:", c)
|
||||
end
|
||||
|
||||
function engio.moveto(actor, place, action, xyz)
|
||||
-- todo: sanity check the action and xyz.
|
||||
tangible.animate(actor, nil, {action=action, xyz=xyz})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user