标签:#Lua

Posts

· 2018-05-27 · * Lua *

Lua performance guide

1. using local

Here's some comparison testing:

a = os.clock()
for i = 1,10000000 do
  local x = math.sin(i)
end
b = os.clock()
print(b-a) --1.113454
· 2018-05-27 · * Lua *

Translate from https://wuzhiwei.net/lua_make_class/

How to implement Class in Lua

There is not a type called Class in Lua, but we could implement it in Lua.

What is Class

To implement Class, we should know what class is.

In my opinion, Class is a self-defined variable type, it defined some properties and functions, is a collection of Properties and Functions.

· 2018-05-09 · * Unity * Lua * Rider *

Rider Download

In Unity Editor:

Project Settings > Editor > Additional extensions to include

add ';lua' append original string.