This repository implements a custom compiler/transpiler plugin for Bitty Engine with an extended Lua syntex.
This plugin implements +=
and -=
operators which the original Lua doesn't support.
local a = 0
for i = 1, 42 do
a += 1 -- Extended operator "+=".
end
print(a)
for i = 1, 42 do
a -= 1 -- Extended operator "-=".
end
print(a)
Seealso paladin-t/bitty.compiler_plugin for details.
- Clone or download this repository.
- Click "Project", "Browse Data Directory..." from the menu bar.
- Ensure there is a "plugins" directory under that directory.
- Put the "plugin.bit" into the new created "plugins" directory. And name it properly.
- Reopen Bitty Engine.
- Create a new asset, select the registered "luax" type.
- Click "Install" to inject necessary assets to the target project.
- Write and run Luax code.