Lua 實現 continue
https://www.runoob.com/note/45233
lua 中沒有 continue 語句有點不習慣。
可以使用類似下面這種方法實現 continue 語句:
for i = 10, 1, -1 do repeat if i == 5 then print("continue code here") break end print(i, "loop code here") until true end
https://www.runoob.com/note/45233
lua 中沒有 continue 語句有點不習慣。
可以使用類似下面這種方法實現 continue 語句:
for i = 10, 1, -1 do repeat if i == 5 then print("continue code here") break end print(i, "loop code here") until true end
Lua 學習 元表 原表 meta table setmetatable 可以設置元表 __index (讀取), __newindex
Lua 函數 及 函數庫 函數定義: -- 函數定義 add = function ( a,b) return a + b end --局部函數
Lua 學習 閉包 先看一個現象 function count() local i = 6 -- upvalue
Unity向Lua傳入參數問題 GameObject go = GameObject.Find("/Light"); Light light = go.GetComponent<Light>(