feat: UI 메이커-저작 전환 + 컨트롤러 재연결 + MainMenu 부트 #74
@@ -10,7 +10,18 @@ ${luaCharsTable()}
|
|||||||
${luaSoulShopTable(SOUL_UNLOCKS)}
|
${luaSoulShopTable(SOUL_UNLOCKS)}
|
||||||
self.SoulUnlocks = {}
|
self.SoulUnlocks = {}
|
||||||
self.SoulPoints = self.SoulPoints or 0
|
self.SoulPoints = self.SoulPoints or 0
|
||||||
self:ShowMainMenu()
|
local uiTries = 0
|
||||||
|
local uiInit = 0
|
||||||
|
uiInit = _TimerService:SetTimerRepeat(function()
|
||||||
|
uiTries = uiTries + 1
|
||||||
|
if _EntityService:GetEntityByPath("/ui/DeckUIGroup") ~= nil then
|
||||||
|
self:ActivateUIGroups()
|
||||||
|
self:ShowMainMenu()
|
||||||
|
_TimerService:ClearTimer(uiInit)
|
||||||
|
elseif uiTries > 80 then
|
||||||
|
_TimerService:ClearTimer(uiInit)
|
||||||
|
end
|
||||||
|
end, 0.1)
|
||||||
local lp = _UserService.LocalPlayer
|
local lp = _UserService.LocalPlayer
|
||||||
if lp ~= nil then
|
if lp ~= nil then
|
||||||
self:ReqLoadAscension(lp.PlayerComponent.UserId)
|
self:ReqLoadAscension(lp.PlayerComponent.UserId)
|
||||||
|
|||||||
@@ -66,5 +66,5 @@ if e ~= nil then
|
|||||||
end`, [
|
end`, [
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' },
|
||||||
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'enabled' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'enabled' },
|
||||||
]),
|
], 2),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -21,6 +21,14 @@ self:SetEntityEnabled("/ui/DeckUIGroup/DeckAllHud", false)
|
|||||||
self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", false)
|
||||||
self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false)
|
||||||
self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)`),
|
self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)`),
|
||||||
|
method('ActivateUIGroups', `local function grp(n)
|
||||||
|
local g = _EntityService:GetEntityByPath("/ui/" .. n)
|
||||||
|
if g ~= nil then g:SetEnable(true) end
|
||||||
|
end
|
||||||
|
grp("SelectUIGroup")
|
||||||
|
grp("LobbyUIGroup")
|
||||||
|
grp("RunUIGroup")
|
||||||
|
grp("DeckUIGroup")`, [], 2),
|
||||||
method('ShowState', `self:HideGameHud()
|
method('ShowState', `self:HideGameHud()
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", state == "menu")
|
self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", state == "menu")
|
||||||
self:SetEntityEnabled("/ui/SelectUIGroup/CharacterSelectHud", state == "charselect")
|
self:SetEntityEnabled("/ui/SelectUIGroup/CharacterSelectHud", state == "charselect")
|
||||||
|
|||||||
Reference in New Issue
Block a user