feat: upgrade to ts2lua-unreal v0.3.0 and refactor Game classes to pure C++ callback + TS composition hot-reload
This commit is contained in:
1 parent
4ad4a8f36f
commit
783dccf53d
64 files changed
+2368
-714
No files matched your search
@@ -1,3 +1,9 @@
|
||||
local function __TS__New(target, ...)
|
||||
local instance = setmetatable({}, target.prototype)
|
||||
instance:____constructor(...)
|
||||
return instance
|
||||
end
|
||||
|
||||
local function __TS__CountVarargs(...)
|
||||
return select("#", ...)
|
||||
end
|
||||
@@ -134,13 +140,6 @@ local function __TS__ArrayIndexOf(self, searchElement, fromIndex)
|
||||
return -1
|
||||
end
|
||||
|
||||
local function __TS__Class(self)
|
||||
local c = {prototype = {}}
|
||||
c.prototype.__index = c.prototype
|
||||
c.prototype.constructor = c
|
||||
return c
|
||||
end
|
||||
|
||||
local function __TS__ClassExtends(target, base)
|
||||
target.____super = base
|
||||
local staticMetatable = setmetatable({__index = base}, base)
|
||||
@@ -166,12 +165,6 @@ local function __TS__ClassExtends(target, base)
|
||||
end
|
||||
end
|
||||
|
||||
local function __TS__New(target, ...)
|
||||
local instance = setmetatable({}, target.prototype)
|
||||
instance:____constructor(...)
|
||||
return instance
|
||||
end
|
||||
|
||||
local __TS__Symbol, Symbol
|
||||
do
|
||||
local symbolMetatable = {__tostring = function(self)
|
||||
@@ -210,14 +203,13 @@ local function __TS__InstanceOf(obj, classTbl)
|
||||
end
|
||||
|
||||
return {
|
||||
__TS__New = __TS__New,
|
||||
__TS__SparseArrayNew = __TS__SparseArrayNew,
|
||||
__TS__SparseArrayPush = __TS__SparseArrayPush,
|
||||
__TS__SparseArraySpread = __TS__SparseArraySpread,
|
||||
__TS__ArraySplice = __TS__ArraySplice,
|
||||
__TS__ArraySort = __TS__ArraySort,
|
||||
__TS__ArrayIndexOf = __TS__ArrayIndexOf,
|
||||
__TS__Class = __TS__Class,
|
||||
__TS__ClassExtends = __TS__ClassExtends,
|
||||
__TS__New = __TS__New,
|
||||
__TS__InstanceOf = __TS__InstanceOf
|
||||
}
|
||||
Reference in new issue
Block a user