Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cocodx
UnityXFramework
提交
d302a50d
U
UnityXFramework
项目概览
cocodx
/
UnityXFramework
与 Fork 源项目一致
Fork自
林新发 / UnityXFramework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
UnityXFramework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d302a50d
编写于
11月 05, 2021
作者:
L
linxinfa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化登录界面
上级
faaeb287
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
464 addition
and
16 deletion
+464
-16
Assembly-CSharp.csproj
Assembly-CSharp.csproj
+3
-0
Assets/LuaFramework/Editor/CustomSettings.cs
Assets/LuaFramework/Editor/CustomSettings.cs
+1
-0
Assets/LuaFramework/Lua/Logic/Login/LoginLogic.lua
Assets/LuaFramework/Lua/Logic/Login/LoginLogic.lua
+1
-3
Assets/LuaFramework/Lua/View/Login/LoginPanel.lua
Assets/LuaFramework/Lua/View/Login/LoginPanel.lua
+26
-6
Assets/LuaFramework/ToLua/Source/Generate/DelegateFactory.cs
Assets/LuaFramework/ToLua/Source/Generate/DelegateFactory.cs
+48
-0
Assets/LuaFramework/ToLua/Source/Generate/LuaBinder.cs
Assets/LuaFramework/ToLua/Source/Generate/LuaBinder.cs
+31
-0
Assets/LuaFramework/ToLua/Source/Generate/LuaFramework_AppConstWrap.cs
...mework/ToLua/Source/Generate/LuaFramework_AppConstWrap.cs
+1
-0
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_Events_UnityEventBaseWrap.cs
.../Source/Generate/UnityEngine_Events_UnityEventBaseWrap.cs
+161
-0
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_Events_UnityEventBaseWrap.cs.meta
...ce/Generate/UnityEngine_Events_UnityEventBaseWrap.cs.meta
+11
-0
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_Events_UnityEvent_stringWrap.cs
...urce/Generate/UnityEngine_Events_UnityEvent_stringWrap.cs
+117
-0
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_Events_UnityEvent_stringWrap.cs.meta
...Generate/UnityEngine_Events_UnityEvent_stringWrap.cs.meta
+11
-0
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_UI_InputField_OnChangeEventWrap.cs
...e/Generate/UnityEngine_UI_InputField_OnChangeEventWrap.cs
+39
-0
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_UI_InputField_OnChangeEventWrap.cs.meta
...erate/UnityEngine_UI_InputField_OnChangeEventWrap.cs.meta
+11
-0
Assets/Scripts/Framework/UGUIExpand/UGUITool.cs
Assets/Scripts/Framework/UGUIExpand/UGUITool.cs
+3
-7
obj/Debug/Assembly-CSharp.csproj.AssemblyReference.cache
obj/Debug/Assembly-CSharp.csproj.AssemblyReference.cache
+0
-0
未找到文件。
Assembly-CSharp.csproj
浏览文件 @
d302a50d
...
@@ -296,6 +296,9 @@
...
@@ -296,6 +296,9 @@
<Compile
Include=
"Assets\Scripts\Framework\UGUIExpand\GuideMask\GuideMaskBhv.cs"
/>
<Compile
Include=
"Assets\Scripts\Framework\UGUIExpand\GuideMask\GuideMaskBhv.cs"
/>
<Compile
Include=
"Assets\LuaFramework\ToLua\Source\Generate\GuideMaskBhvWrap.cs"
/>
<Compile
Include=
"Assets\LuaFramework\ToLua\Source\Generate\GuideMaskBhvWrap.cs"
/>
<Compile
Include=
"Assets\Scripts\Framework\UGUIExpand\MirrorImage\MirrorImage.cs"
/>
<Compile
Include=
"Assets\Scripts\Framework\UGUIExpand\MirrorImage\MirrorImage.cs"
/>
<Compile
Include=
"Assets\LuaFramework\ToLua\Source\Generate\UnityEngine_Events_UnityEvent_stringWrap.cs"
/>
<Compile
Include=
"Assets\LuaFramework\ToLua\Source\Generate\UnityEngine_UI_InputField_OnChangeEventWrap.cs"
/>
<Compile
Include=
"Assets\LuaFramework\ToLua\Source\Generate\UnityEngine_Events_UnityEventBaseWrap.cs"
/>
<None
Include=
"Assets\RawAssets\GuideMask\Shader\GuideMask.shader"
/>
<None
Include=
"Assets\RawAssets\GuideMask\Shader\GuideMask.shader"
/>
<None
Include=
"Assets\output_log.txt"
/>
<None
Include=
"Assets\output_log.txt"
/>
<None
Include=
"Assets\Scripts\代码目录说明.txt"
/>
<None
Include=
"Assets\Scripts\代码目录说明.txt"
/>
...
...
Assets/LuaFramework/Editor/CustomSettings.cs
浏览文件 @
d302a50d
...
@@ -165,6 +165,7 @@ namespace LuaFramework
...
@@ -165,6 +165,7 @@ namespace LuaFramework
_GT
(
typeof
(
Toggle
)),
_GT
(
typeof
(
Toggle
)),
_GT
(
typeof
(
Slider
)),
_GT
(
typeof
(
Slider
)),
_GT
(
typeof
(
InputField
)),
_GT
(
typeof
(
InputField
)),
_GT
(
typeof
(
InputField
.
OnChangeEvent
)),
_GT
(
typeof
(
Dropdown
)),
_GT
(
typeof
(
Dropdown
)),
// TODO: 添加自定义的类
// TODO: 添加自定义的类
...
...
Assets/LuaFramework/Lua/Logic/Login/LoginLogic.lua
浏览文件 @
d302a50d
...
@@ -8,9 +8,7 @@ function LoginLogic.DoLogin(account, pwdMd5, cb)
...
@@ -8,9 +8,7 @@ function LoginLogic.DoLogin(account, pwdMd5, cb)
if
not
this
.
CheckAccount
(
account
)
then
if
not
this
.
CheckAccount
(
account
)
then
return
return
end
end
if
not
this
.
CheckPwd
(
pwdMd5
)
then
return
end
-- TODO 调用SDK或与游戏服务端通信,执行登录流程
-- TODO 调用SDK或与游戏服务端通信,执行登录流程
log
(
"DoLogin, account: "
..
account
..
", pwdMd5: "
..
pwdMd5
)
log
(
"DoLogin, account: "
..
account
..
", pwdMd5: "
..
pwdMd5
)
-- 缓存账号密码
-- 缓存账号密码
...
...
Assets/LuaFramework/Lua/View/Login/LoginPanel.lua
浏览文件 @
d302a50d
...
@@ -26,26 +26,46 @@ function LoginPanel:SetUi(binder)
...
@@ -26,26 +26,46 @@ function LoginPanel:SetUi(binder)
local
accountInput
=
binder
:
GetObj
(
"accountInput"
)
local
accountInput
=
binder
:
GetObj
(
"accountInput"
)
accountInput
.
text
=
Cache
.
Get
(
"ACCOUNT"
,
""
)
accountInput
.
text
=
Cache
.
Get
(
"ACCOUNT"
,
""
)
-- 密码输入框
-- 密码输入框
local
pwdMd5
=
Cache
.
Get
(
"PASSWORD"
,
""
)
local
cachePwdMd5
=
Cache
.
Get
(
"PASSWORD"
,
""
)
local
finalPwdMd5
=
cachePwdMd5
local
pwdInput
=
UGUITool
.
SetInputField
(
binder
,
"pwdInput"
,
function
(
v
)
local
pwdInput
=
UGUITool
.
SetInputField
(
binder
,
"pwdInput"
,
function
(
v
)
-- 输入框编辑完毕后会进入这个回调
if
"********"
==
v
then
if
"********"
==
v
then
return
return
end
end
local
newPwdMd5
=
Util
.
md5
(
v
)
local
newPwdMd5
=
Util
.
md5
(
v
)
if
newPwdMd5
~=
p
wdMd5
then
if
newPwdMd5
~=
cacheP
wdMd5
then
p
wdMd5
=
newPwdMd5
finalP
wdMd5
=
newPwdMd5
end
end
end
)
end
)
if
not
LuaUtil
.
IsStrNullOrEmpty
(
pwdMd5
)
then
-- 当缓存了密码,修改任何字符都会清掉密码
pwdInput
.
onValueChanged
:
AddListener
(
function
(
v
)
if
"********"
==
v
then
return
end
if
not
LuaUtil
.
IsStrNullOrEmpty
(
cachePwdMd5
)
then
cachePwdMd5
=
""
pwdInput
.
text
=
""
end
end
)
-- 如果缓存了密码,则密码框显示为********
if
not
LuaUtil
.
IsStrNullOrEmpty
(
cachePwdMd5
)
then
pwdInput
.
text
=
"********"
pwdInput
.
text
=
"********"
end
end
-- 登录按钮
-- 登录按钮
UGUITool
.
SetButton
(
binder
,
"loginBtn"
,
function
(
btn
)
UGUITool
.
SetButton
(
binder
,
"loginBtn"
,
function
(
btn
)
if
not
LoginLogic
.
CheckPwd
(
pwdInput
.
text
)
then
return
end
-- 执行登录
-- 执行登录
local
account
=
accountInput
.
text
local
account
=
accountInput
.
text
LoginLogic
.
DoLogin
(
account
,
pwdMd5
,
function
(
ok
)
-- logGreen("pwd :" .. pwdInput.text .. ", md5: " .. Util.md5(pwdInput.text))
LoginLogic
.
DoLogin
(
account
,
finalPwdMd5
,
function
(
ok
)
if
not
ok
then
return
end
if
not
ok
then
return
end
-- 登录成功,关闭登录界面
-- 登录成功,关闭登录界面
self
.
Hide
()
self
.
Hide
()
...
...
Assets/LuaFramework/ToLua/Source/Generate/DelegateFactory.cs
浏览文件 @
d302a50d
...
@@ -38,6 +38,7 @@ public static class DelegateFactory
...
@@ -38,6 +38,7 @@ public static class DelegateFactory
dict
.
Add
(
typeof
(
System
.
Action
<
float
>),
System_Action_float
);
dict
.
Add
(
typeof
(
System
.
Action
<
float
>),
System_Action_float
);
dict
.
Add
(
typeof
(
UnityEngine
.
RectTransform
.
ReapplyDrivenProperties
),
UnityEngine_RectTransform_ReapplyDrivenProperties
);
dict
.
Add
(
typeof
(
UnityEngine
.
RectTransform
.
ReapplyDrivenProperties
),
UnityEngine_RectTransform_ReapplyDrivenProperties
);
dict
.
Add
(
typeof
(
UnityEngine
.
UI
.
InputField
.
OnValidateInput
),
UnityEngine_UI_InputField_OnValidateInput
);
dict
.
Add
(
typeof
(
UnityEngine
.
UI
.
InputField
.
OnValidateInput
),
UnityEngine_UI_InputField_OnValidateInput
);
dict
.
Add
(
typeof
(
UnityEngine
.
Events
.
UnityAction
<
string
>),
UnityEngine_Events_UnityAction_string
);
dict
.
Add
(
typeof
(
MyEventHandler
),
MyEventHandler
);
dict
.
Add
(
typeof
(
MyEventHandler
),
MyEventHandler
);
}
}
...
@@ -1153,6 +1154,53 @@ public static class DelegateFactory
...
@@ -1153,6 +1154,53 @@ public static class DelegateFactory
}
}
}
}
class
UnityEngine_Events_UnityAction_string_Event
:
LuaDelegate
{
public
UnityEngine_Events_UnityAction_string_Event
(
LuaFunction
func
)
:
base
(
func
)
{
}
public
UnityEngine_Events_UnityAction_string_Event
(
LuaFunction
func
,
LuaTable
self
)
:
base
(
func
,
self
)
{
}
public
void
Call
(
string
param0
)
{
func
.
BeginPCall
();
func
.
Push
(
param0
);
func
.
PCall
();
func
.
EndPCall
();
}
public
void
CallWithSelf
(
string
param0
)
{
func
.
BeginPCall
();
func
.
Push
(
self
);
func
.
Push
(
param0
);
func
.
PCall
();
func
.
EndPCall
();
}
}
public
static
Delegate
UnityEngine_Events_UnityAction_string
(
LuaFunction
func
,
LuaTable
self
,
bool
flag
)
{
if
(
func
==
null
)
{
UnityEngine
.
Events
.
UnityAction
<
string
>
fn
=
delegate
(
string
param0
)
{
};
return
fn
;
}
if
(!
flag
)
{
UnityEngine_Events_UnityAction_string_Event
target
=
new
UnityEngine_Events_UnityAction_string_Event
(
func
);
UnityEngine
.
Events
.
UnityAction
<
string
>
d
=
target
.
Call
;
target
.
method
=
d
.
Method
;
return
d
;
}
else
{
UnityEngine_Events_UnityAction_string_Event
target
=
new
UnityEngine_Events_UnityAction_string_Event
(
func
,
self
);
UnityEngine
.
Events
.
UnityAction
<
string
>
d
=
target
.
CallWithSelf
;
target
.
method
=
d
.
Method
;
return
d
;
}
}
class
MyEventHandler_Event
:
LuaDelegate
class
MyEventHandler_Event
:
LuaDelegate
{
{
public
MyEventHandler_Event
(
LuaFunction
func
)
:
base
(
func
)
{
}
public
MyEventHandler_Event
(
LuaFunction
func
)
:
base
(
func
)
{
}
...
...
Assets/LuaFramework/ToLua/Source/Generate/LuaBinder.cs
浏览文件 @
d302a50d
...
@@ -79,6 +79,7 @@ public static class LuaBinder
...
@@ -79,6 +79,7 @@ public static class LuaBinder
UnityEngine_UI_MaskableGraphicWrap
.
Register
(
L
);
UnityEngine_UI_MaskableGraphicWrap
.
Register
(
L
);
UnityEngine_UI_GraphicWrap
.
Register
(
L
);
UnityEngine_UI_GraphicWrap
.
Register
(
L
);
L
.
BeginModule
(
"InputField"
);
L
.
BeginModule
(
"InputField"
);
UnityEngine_UI_InputField_OnChangeEventWrap
.
Register
(
L
);
L
.
RegFunction
(
"OnValidateInput"
,
UnityEngine_UI_InputField_OnValidateInput
);
L
.
RegFunction
(
"OnValidateInput"
,
UnityEngine_UI_InputField_OnValidateInput
);
L
.
EndModule
();
L
.
EndModule
();
L
.
EndModule
();
L
.
EndModule
();
...
@@ -86,7 +87,10 @@ public static class LuaBinder
...
@@ -86,7 +87,10 @@ public static class LuaBinder
UnityEngine_EventSystems_UIBehaviourWrap
.
Register
(
L
);
UnityEngine_EventSystems_UIBehaviourWrap
.
Register
(
L
);
L
.
EndModule
();
L
.
EndModule
();
L
.
BeginModule
(
"Events"
);
L
.
BeginModule
(
"Events"
);
UnityEngine_Events_UnityEvent_stringWrap
.
Register
(
L
);
UnityEngine_Events_UnityEventBaseWrap
.
Register
(
L
);
L
.
RegFunction
(
"UnityAction"
,
UnityEngine_Events_UnityAction
);
L
.
RegFunction
(
"UnityAction"
,
UnityEngine_Events_UnityAction
);
L
.
RegFunction
(
"UnityAction_string"
,
UnityEngine_Events_UnityAction_string
);
L
.
EndModule
();
L
.
EndModule
();
L
.
BeginModule
(
"Camera"
);
L
.
BeginModule
(
"Camera"
);
L
.
RegFunction
(
"CameraCallback"
,
UnityEngine_Camera_CameraCallback
);
L
.
RegFunction
(
"CameraCallback"
,
UnityEngine_Camera_CameraCallback
);
...
@@ -243,6 +247,33 @@ public static class LuaBinder
...
@@ -243,6 +247,33 @@ public static class LuaBinder
}
}
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
UnityEngine_Events_UnityAction_string
(
IntPtr
L
)
{
try
{
int
count
=
LuaDLL
.
lua_gettop
(
L
);
LuaFunction
func
=
ToLua
.
CheckLuaFunction
(
L
,
1
);
if
(
count
==
1
)
{
Delegate
arg1
=
DelegateFactory
.
CreateDelegate
(
typeof
(
UnityEngine
.
Events
.
UnityAction
<
string
>),
func
);
ToLua
.
Push
(
L
,
arg1
);
}
else
{
LuaTable
self
=
ToLua
.
CheckLuaTable
(
L
,
2
);
Delegate
arg1
=
DelegateFactory
.
CreateDelegate
(
typeof
(
UnityEngine
.
Events
.
UnityAction
<
string
>),
func
,
self
);
ToLua
.
Push
(
L
,
arg1
);
}
return
1
;
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
UnityEngine_Camera_CameraCallback
(
IntPtr
L
)
static
int
UnityEngine_Camera_CameraCallback
(
IntPtr
L
)
{
{
...
...
Assets/LuaFramework/ToLua/Source/Generate/LuaFramework_AppConstWrap.cs
浏览文件 @
d302a50d
...
@@ -12,6 +12,7 @@ public class LuaFramework_AppConstWrap
...
@@ -12,6 +12,7 @@ public class LuaFramework_AppConstWrap
L
.
RegConstant
(
"DebugMode"
,
0
);
L
.
RegConstant
(
"DebugMode"
,
0
);
L
.
RegConstant
(
"ExampleMode"
,
0
);
L
.
RegConstant
(
"ExampleMode"
,
0
);
L
.
RegConstant
(
"TimerInterval"
,
1
);
L
.
RegConstant
(
"TimerInterval"
,
1
);
L
.
RegConstant
(
"GameFrameRate"
,
30
);
L
.
RegVar
(
"AppName"
,
get_AppName
,
null
);
L
.
RegVar
(
"AppName"
,
get_AppName
,
null
);
L
.
RegVar
(
"LuaTempDir"
,
get_LuaTempDir
,
null
);
L
.
RegVar
(
"LuaTempDir"
,
get_LuaTempDir
,
null
);
L
.
RegVar
(
"ExtName"
,
get_ExtName
,
null
);
L
.
RegVar
(
"ExtName"
,
get_ExtName
,
null
);
...
...
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_Events_UnityEventBaseWrap.cs
0 → 100644
浏览文件 @
d302a50d
//this source code was auto-generated by tolua#, do not modify it
using
System
;
using
LuaInterface
;
public
class
UnityEngine_Events_UnityEventBaseWrap
{
public
static
void
Register
(
LuaState
L
)
{
L
.
BeginClass
(
typeof
(
UnityEngine
.
Events
.
UnityEventBase
),
typeof
(
System
.
Object
));
L
.
RegFunction
(
"GetPersistentEventCount"
,
GetPersistentEventCount
);
L
.
RegFunction
(
"GetPersistentTarget"
,
GetPersistentTarget
);
L
.
RegFunction
(
"GetPersistentMethodName"
,
GetPersistentMethodName
);
L
.
RegFunction
(
"SetPersistentListenerState"
,
SetPersistentListenerState
);
L
.
RegFunction
(
"RemoveAllListeners"
,
RemoveAllListeners
);
L
.
RegFunction
(
"ToString"
,
ToString
);
L
.
RegFunction
(
"GetValidMethodInfo"
,
GetValidMethodInfo
);
L
.
RegFunction
(
"__tostring"
,
ToLua
.
op_ToString
);
L
.
EndClass
();
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
GetPersistentEventCount
(
IntPtr
L
)
{
try
{
ToLua
.
CheckArgsCount
(
L
,
1
);
UnityEngine
.
Events
.
UnityEventBase
obj
=
(
UnityEngine
.
Events
.
UnityEventBase
)
ToLua
.
CheckObject
(
L
,
1
,
typeof
(
UnityEngine
.
Events
.
UnityEventBase
));
int
o
=
obj
.
GetPersistentEventCount
();
LuaDLL
.
lua_pushinteger
(
L
,
o
);
return
1
;
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
GetPersistentTarget
(
IntPtr
L
)
{
try
{
ToLua
.
CheckArgsCount
(
L
,
2
);
UnityEngine
.
Events
.
UnityEventBase
obj
=
(
UnityEngine
.
Events
.
UnityEventBase
)
ToLua
.
CheckObject
(
L
,
1
,
typeof
(
UnityEngine
.
Events
.
UnityEventBase
));
int
arg0
=
(
int
)
LuaDLL
.
luaL_checknumber
(
L
,
2
);
UnityEngine
.
Object
o
=
obj
.
GetPersistentTarget
(
arg0
);
ToLua
.
Push
(
L
,
o
);
return
1
;
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
GetPersistentMethodName
(
IntPtr
L
)
{
try
{
ToLua
.
CheckArgsCount
(
L
,
2
);
UnityEngine
.
Events
.
UnityEventBase
obj
=
(
UnityEngine
.
Events
.
UnityEventBase
)
ToLua
.
CheckObject
(
L
,
1
,
typeof
(
UnityEngine
.
Events
.
UnityEventBase
));
int
arg0
=
(
int
)
LuaDLL
.
luaL_checknumber
(
L
,
2
);
string
o
=
obj
.
GetPersistentMethodName
(
arg0
);
LuaDLL
.
lua_pushstring
(
L
,
o
);
return
1
;
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
SetPersistentListenerState
(
IntPtr
L
)
{
try
{
ToLua
.
CheckArgsCount
(
L
,
3
);
UnityEngine
.
Events
.
UnityEventBase
obj
=
(
UnityEngine
.
Events
.
UnityEventBase
)
ToLua
.
CheckObject
(
L
,
1
,
typeof
(
UnityEngine
.
Events
.
UnityEventBase
));
int
arg0
=
(
int
)
LuaDLL
.
luaL_checknumber
(
L
,
2
);
UnityEngine
.
Events
.
UnityEventCallState
arg1
=
(
UnityEngine
.
Events
.
UnityEventCallState
)
ToLua
.
CheckObject
(
L
,
3
,
typeof
(
UnityEngine
.
Events
.
UnityEventCallState
));
obj
.
SetPersistentListenerState
(
arg0
,
arg1
);
return
0
;
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
RemoveAllListeners
(
IntPtr
L
)
{
try
{
ToLua
.
CheckArgsCount
(
L
,
1
);
UnityEngine
.
Events
.
UnityEventBase
obj
=
(
UnityEngine
.
Events
.
UnityEventBase
)
ToLua
.
CheckObject
(
L
,
1
,
typeof
(
UnityEngine
.
Events
.
UnityEventBase
));
obj
.
RemoveAllListeners
();
return
0
;
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
ToString
(
IntPtr
L
)
{
try
{
ToLua
.
CheckArgsCount
(
L
,
1
);
UnityEngine
.
Events
.
UnityEventBase
obj
=
(
UnityEngine
.
Events
.
UnityEventBase
)
ToLua
.
CheckObject
(
L
,
1
,
typeof
(
UnityEngine
.
Events
.
UnityEventBase
));
string
o
=
obj
.
ToString
();
LuaDLL
.
lua_pushstring
(
L
,
o
);
return
1
;
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
GetValidMethodInfo
(
IntPtr
L
)
{
try
{
int
count
=
LuaDLL
.
lua_gettop
(
L
);
if
(
count
==
3
&&
TypeChecker
.
CheckTypes
(
L
,
1
,
typeof
(
System
.
Type
),
typeof
(
string
),
typeof
(
System
.
Type
[])))
{
System
.
Type
arg0
=
(
System
.
Type
)
ToLua
.
ToObject
(
L
,
1
);
string
arg1
=
ToLua
.
ToString
(
L
,
2
);
System
.
Type
[]
arg2
=
ToLua
.
CheckObjectArray
<
System
.
Type
>(
L
,
3
);
System
.
Reflection
.
MethodInfo
o
=
UnityEngine
.
Events
.
UnityEventBase
.
GetValidMethodInfo
(
arg0
,
arg1
,
arg2
);
ToLua
.
PushObject
(
L
,
o
);
return
1
;
}
else
if
(
count
==
3
&&
TypeChecker
.
CheckTypes
(
L
,
1
,
typeof
(
object
),
typeof
(
string
),
typeof
(
System
.
Type
[])))
{
object
arg0
=
ToLua
.
ToVarObject
(
L
,
1
);
string
arg1
=
ToLua
.
ToString
(
L
,
2
);
System
.
Type
[]
arg2
=
ToLua
.
CheckObjectArray
<
System
.
Type
>(
L
,
3
);
System
.
Reflection
.
MethodInfo
o
=
UnityEngine
.
Events
.
UnityEventBase
.
GetValidMethodInfo
(
arg0
,
arg1
,
arg2
);
ToLua
.
PushObject
(
L
,
o
);
return
1
;
}
else
{
return
LuaDLL
.
luaL_throw
(
L
,
"invalid arguments to method: UnityEngine.Events.UnityEventBase.GetValidMethodInfo"
);
}
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
}
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_Events_UnityEventBaseWrap.cs.meta
0 → 100644
浏览文件 @
d302a50d
fileFormatVersion: 2
guid: 0244c2247600ae84589016c41d81b434
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_Events_UnityEvent_stringWrap.cs
0 → 100644
浏览文件 @
d302a50d
//this source code was auto-generated by tolua#, do not modify it
using
System
;
using
LuaInterface
;
public
class
UnityEngine_Events_UnityEvent_stringWrap
{
public
static
void
Register
(
LuaState
L
)
{
L
.
BeginClass
(
typeof
(
UnityEngine
.
Events
.
UnityEvent
<
string
>),
typeof
(
UnityEngine
.
Events
.
UnityEventBase
),
"UnityEvent_string"
);
L
.
RegFunction
(
"AddListener"
,
AddListener
);
L
.
RegFunction
(
"RemoveListener"
,
RemoveListener
);
L
.
RegFunction
(
"Invoke"
,
Invoke
);
L
.
RegFunction
(
"New"
,
_CreateUnityEngine_Events_UnityEvent_string
);
L
.
RegFunction
(
"__tostring"
,
ToLua
.
op_ToString
);
L
.
EndClass
();
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
_CreateUnityEngine_Events_UnityEvent_string
(
IntPtr
L
)
{
try
{
int
count
=
LuaDLL
.
lua_gettop
(
L
);
if
(
count
==
0
)
{
UnityEngine
.
Events
.
UnityEvent
<
string
>
obj
=
new
UnityEngine
.
Events
.
UnityEvent
<
string
>();
ToLua
.
PushObject
(
L
,
obj
);
return
1
;
}
else
{
return
LuaDLL
.
luaL_throw
(
L
,
"invalid arguments to ctor method: UnityEngine.Events.UnityEvent<string>.New"
);
}
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
AddListener
(
IntPtr
L
)
{
try
{
ToLua
.
CheckArgsCount
(
L
,
2
);
UnityEngine
.
Events
.
UnityEvent
<
string
>
obj
=
(
UnityEngine
.
Events
.
UnityEvent
<
string
>)
ToLua
.
CheckObject
(
L
,
1
,
typeof
(
UnityEngine
.
Events
.
UnityEvent
<
string
>));
UnityEngine
.
Events
.
UnityAction
<
string
>
arg0
=
null
;
LuaTypes
funcType2
=
LuaDLL
.
lua_type
(
L
,
2
);
if
(
funcType2
!=
LuaTypes
.
LUA_TFUNCTION
)
{
arg0
=
(
UnityEngine
.
Events
.
UnityAction
<
string
>)
ToLua
.
CheckObject
(
L
,
2
,
typeof
(
UnityEngine
.
Events
.
UnityAction
<
string
>));
}
else
{
LuaFunction
func
=
ToLua
.
ToLuaFunction
(
L
,
2
);
arg0
=
DelegateFactory
.
CreateDelegate
(
typeof
(
UnityEngine
.
Events
.
UnityAction
<
string
>),
func
)
as
UnityEngine
.
Events
.
UnityAction
<
string
>;
}
obj
.
AddListener
(
arg0
);
return
0
;
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
RemoveListener
(
IntPtr
L
)
{
try
{
ToLua
.
CheckArgsCount
(
L
,
2
);
UnityEngine
.
Events
.
UnityEvent
<
string
>
obj
=
(
UnityEngine
.
Events
.
UnityEvent
<
string
>)
ToLua
.
CheckObject
(
L
,
1
,
typeof
(
UnityEngine
.
Events
.
UnityEvent
<
string
>));
UnityEngine
.
Events
.
UnityAction
<
string
>
arg0
=
null
;
LuaTypes
funcType2
=
LuaDLL
.
lua_type
(
L
,
2
);
if
(
funcType2
!=
LuaTypes
.
LUA_TFUNCTION
)
{
arg0
=
(
UnityEngine
.
Events
.
UnityAction
<
string
>)
ToLua
.
CheckObject
(
L
,
2
,
typeof
(
UnityEngine
.
Events
.
UnityAction
<
string
>));
}
else
{
LuaFunction
func
=
ToLua
.
ToLuaFunction
(
L
,
2
);
arg0
=
DelegateFactory
.
CreateDelegate
(
typeof
(
UnityEngine
.
Events
.
UnityAction
<
string
>),
func
)
as
UnityEngine
.
Events
.
UnityAction
<
string
>;
}
obj
.
RemoveListener
(
arg0
);
return
0
;
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
Invoke
(
IntPtr
L
)
{
try
{
ToLua
.
CheckArgsCount
(
L
,
2
);
UnityEngine
.
Events
.
UnityEvent
<
string
>
obj
=
(
UnityEngine
.
Events
.
UnityEvent
<
string
>)
ToLua
.
CheckObject
(
L
,
1
,
typeof
(
UnityEngine
.
Events
.
UnityEvent
<
string
>));
string
arg0
=
ToLua
.
CheckString
(
L
,
2
);
obj
.
Invoke
(
arg0
);
return
0
;
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
}
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_Events_UnityEvent_stringWrap.cs.meta
0 → 100644
浏览文件 @
d302a50d
fileFormatVersion: 2
guid: 6724732865ef87e44a16b2c77335abed
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_UI_InputField_OnChangeEventWrap.cs
0 → 100644
浏览文件 @
d302a50d
//this source code was auto-generated by tolua#, do not modify it
using
System
;
using
LuaInterface
;
public
class
UnityEngine_UI_InputField_OnChangeEventWrap
{
public
static
void
Register
(
LuaState
L
)
{
L
.
BeginClass
(
typeof
(
UnityEngine
.
UI
.
InputField
.
OnChangeEvent
),
typeof
(
UnityEngine
.
Events
.
UnityEvent
<
string
>));
L
.
RegFunction
(
"New"
,
_CreateUnityEngine_UI_InputField_OnChangeEvent
);
L
.
RegFunction
(
"__tostring"
,
ToLua
.
op_ToString
);
L
.
EndClass
();
}
[
MonoPInvokeCallbackAttribute
(
typeof
(
LuaCSFunction
))]
static
int
_CreateUnityEngine_UI_InputField_OnChangeEvent
(
IntPtr
L
)
{
try
{
int
count
=
LuaDLL
.
lua_gettop
(
L
);
if
(
count
==
0
)
{
UnityEngine
.
UI
.
InputField
.
OnChangeEvent
obj
=
new
UnityEngine
.
UI
.
InputField
.
OnChangeEvent
();
ToLua
.
PushObject
(
L
,
obj
);
return
1
;
}
else
{
return
LuaDLL
.
luaL_throw
(
L
,
"invalid arguments to ctor method: UnityEngine.UI.InputField.OnChangeEvent.New"
);
}
}
catch
(
Exception
e
)
{
return
LuaDLL
.
toluaL_exception
(
L
,
e
);
}
}
}
Assets/LuaFramework/ToLua/Source/Generate/UnityEngine_UI_InputField_OnChangeEventWrap.cs.meta
0 → 100644
浏览文件 @
d302a50d
fileFormatVersion: 2
guid: b243297d3317a504ca5715b4185d7774
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Framework/UGUIExpand/UGUITool.cs
浏览文件 @
d302a50d
...
@@ -35,8 +35,6 @@ public class UGUITool
...
@@ -35,8 +35,6 @@ public class UGUITool
GameLogger
.
LogError
(
"SetButton Error, obj is null: "
+
name
);
GameLogger
.
LogError
(
"SetButton Error, obj is null: "
+
name
);
return
null
;
return
null
;
}
}
btn
.
onClick
.
RemoveAllListeners
();
btn
.
onClick
.
AddListener
(()
=>
btn
.
onClick
.
AddListener
(()
=>
{
{
if
(
null
!=
onClick
)
if
(
null
!=
onClick
)
...
@@ -58,16 +56,14 @@ public class UGUITool
...
@@ -58,16 +56,14 @@ public class UGUITool
GameLogger
.
LogError
(
"SetInputField Error, obj is null: "
+
name
);
GameLogger
.
LogError
(
"SetInputField Error, obj is null: "
+
name
);
return
null
;
return
null
;
}
}
input
.
onEndEdit
.
RemoveAllListeners
();
input
.
onEndEdit
.
AddListener
((
v
)
=>
input
.
onEndEdit
.
AddListener
((
v
)
=>
{
{
if
(
null
!=
onEndEdit
)
if
(
null
!=
onEndEdit
)
onEndEdit
(
v
);
onEndEdit
(
v
);
});
});
return
input
;
return
input
;
}
}
/// <summary>
/// <summary>
/// 设置下拉框选择回调
/// 设置下拉框选择回调
/// </summary>
/// </summary>
...
@@ -87,7 +83,7 @@ public class UGUITool
...
@@ -87,7 +83,7 @@ public class UGUITool
if
(
null
!=
onValueChanged
)
if
(
null
!=
onValueChanged
)
onValueChanged
(
v
);
onValueChanged
(
v
);
});
});
return
dropdown
;
return
dropdown
;
}
}
...
@@ -139,5 +135,5 @@ public class UGUITool
...
@@ -139,5 +135,5 @@ public class UGUITool
return
slider
;
return
slider
;
}
}
}
}
obj/Debug/Assembly-CSharp.csproj.AssemblyReference.cache
浏览文件 @
d302a50d
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录