Skip to content

Commit fe4934a

Browse files
committed
LuaLib
1 parent f267559 commit fe4934a

168 files changed

Lines changed: 507 additions & 1612 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Assets/Resources/Version.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"LargeVersion":1,"SmallVerson":2}

Assets/Script/Core/Application/GameStatus.meta

Lines changed: 0 additions & 9 deletions
This file was deleted.

Assets/Script/Core/Editor/Lua/Res.meta

Lines changed: 0 additions & 9 deletions
This file was deleted.

Assets/Script/Core/Editor/res/LuaLib/FrameWork.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Script/Core/Editor/res/LuaLib/FrameWork/Data.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Script/Core/Editor/res/LuaLib/FrameWork/Data/LuaDataHelper.txt.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Script/Core/Editor/res/LuaLib/FrameWork/LuaFrameWorkEventName.txt.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Script/Core/Editor/res/LuaLib/FrameWork/Status.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Script/Core/Editor/res/LuaLib/FrameWork/Status/LuaStatusManager.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
LuaStatusManager = {};
22
LuaStatusManager.s_currentStatus = nil;
3-
LuaStatusManager.t_statusDict = {};
3+
LuaStatusManager.t_statusDict = {};
4+
LuaStatusManager.Current = nil;
45

56
function LuaStatusManager:EnterStatus(s_StatusName)
67

@@ -15,6 +16,7 @@ function LuaStatusManager:EnterStatus(s_StatusName)
1516
--创建Lua类
1617
local t_status = t_LuaStatusMetaTable:New();
1718
self.t_statusDict[s_StatusName] = t_status;
19+
self.Current = t_status;
1820
--调用Init方法
1921
t_status:OnStatusInit();
2022
else
@@ -33,6 +35,8 @@ function LuaStatusManager:ExitStatus(s_StatusName)
3335

3436
if t_status ~= nil then
3537
self.s_currentStatus = nil;
38+
self.Current = nil;
39+
t_status:CloseALLUIWindow();
3640
t_status:OnExitStatus();
3741
else
3842
error("ExitStatus 没有找到 ->"..tostring(s_StatusName).."<- Status");
@@ -42,7 +46,7 @@ end
4246

4347

4448
function LuaStatusManager:DestroyStatus(s_StatusName)
45-
49+
4650
local t_status = self.t_statusDict[s_StatusName];
4751

4852
if t_status ~= nil then
@@ -70,4 +74,14 @@ function LuaStatusManager:GetStatus(s_StatusName)
7074
error("GetStatus 没有找到 ->"..tostring(s_StatusName).."<- Status");
7175
end
7276

77+
end
78+
79+
80+
function LuaStatusManager:GetCurrentStatus()
81+
82+
if self.Current == nil then
83+
error("GetCurrentStatus error : 没有找到当前Status!");
84+
end
85+
86+
return self.current;
7387
end

Assets/Script/Core/Editor/res/LuaLib/FrameWork/Status/LuaStatusManager.txt.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)