From: Andy Belle-Isle Date: Sat, 31 Aug 2019 20:09:39 +0000 (-0400) Subject: Forgot to add Velocity component binding to Lua, added X-Git-Tag: v0.1-alpha~11 X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=87f08aaec01c3137637bbcd07bace30e8dd8fd90;p=clyne%2Fgamedev2.git Forgot to add Velocity component binding to Lua, added --- diff --git a/src/script.cpp b/src/script.cpp index d471d65..ec82513 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -101,6 +101,11 @@ void ScriptSystem::scriptExport() "visible", &Render::visible, "texture", &Render::texture); + lua.new_usertype("Velocity", + sol::constructors(), + "x", &Velocity::x, + "y", &Velocity::y); + auto gamespace = lua["game"].get_or_create(); gamespace.set_function("spawn", func); }