feat(deck): 컨트롤러 UI 경로를 새 UIGroup으로 재연결
cb/*.mjs의 /ui/DefaultGroup/<Section> 리터럴을 메이커 재편 UIGroup으로 일괄 remap: - SelectUIGroup(charselect/job), LobbyUIGroup(lobby/board/soulshop), RunUIGroup(combat/map/shop/rest/treasure/reward/cardhand/deck), DeckUIGroup(덱 도감). MainMenu·월드조작은 DefaultGroup 잔류. - 몬스터 슬롯 CombatHud/MonsterSlot → RunUIGroup/CombatHud/MonsterStatus - 검증: cbgap GAP 0 (참조 경로 전부 새 .ui에 실재), 이동섹션 DefaultGroup 잔여 0 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -50,7 +50,7 @@ if v > self.AscensionUnlocked then v = self.AscensionUnlocked end
|
|||||||
self.AscensionLevel = v
|
self.AscensionLevel = v
|
||||||
self:RenderAscension()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'delta' }]),
|
self:RenderAscension()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'delta' }]),
|
||||||
method('RenderAscension', `self:SetText("/ui/DefaultGroup/MainMenu/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked))
|
method('RenderAscension', `self:SetText("/ui/DefaultGroup/MainMenu/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked))
|
||||||
self:SetText("/ui/DefaultGroup/LobbyHud/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked))`),
|
self:SetText("/ui/LobbyUIGroup/LobbyHud/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked))`),
|
||||||
method('AscHpMult', `local m = 1
|
method('AscHpMult', `local m = 1
|
||||||
if self.AscensionLevel >= 1 then m = m + 0.1 end
|
if self.AscensionLevel >= 1 then m = m + 0.1 end
|
||||||
if self.AscensionLevel >= 6 then m = m + 0.1 end
|
if self.AscensionLevel >= 6 then m = m + 0.1 end
|
||||||
|
|||||||
@@ -10,19 +10,19 @@ self:RenderCharacterSelect()`),
|
|||||||
self:RenderCharacterSelect()`, [
|
self:RenderCharacterSelect()`, [
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' },
|
||||||
]),
|
]),
|
||||||
method('RenderCharacterSelect', `local warriorArt = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/WarriorButton/Art")
|
method('RenderCharacterSelect', `local warriorArt = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/WarriorButton/Art")
|
||||||
if warriorArt ~= nil and warriorArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["warrior"] ~= nil then
|
if warriorArt ~= nil and warriorArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["warrior"] ~= nil then
|
||||||
warriorArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["warrior"]
|
warriorArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["warrior"]
|
||||||
end
|
end
|
||||||
local mageArt = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageButton/Art")
|
local mageArt = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/MageButton/Art")
|
||||||
if mageArt ~= nil and mageArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["magician"] ~= nil then
|
if mageArt ~= nil and mageArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["magician"] ~= nil then
|
||||||
mageArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["magician"]
|
mageArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["magician"]
|
||||||
end
|
end
|
||||||
local thiefArt = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefButton/Art")
|
local thiefArt = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/ThiefButton/Art")
|
||||||
if thiefArt ~= nil and thiefArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["bandit"] ~= nil then
|
if thiefArt ~= nil and thiefArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["bandit"] ~= nil then
|
||||||
thiefArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["bandit"]
|
thiefArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["bandit"]
|
||||||
end
|
end
|
||||||
local warrior = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/WarriorButton")
|
local warrior = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/WarriorButton")
|
||||||
if warrior ~= nil and warrior.SpriteGUIRendererComponent ~= nil then
|
if warrior ~= nil and warrior.SpriteGUIRendererComponent ~= nil then
|
||||||
if self.SelectedClass == "warrior" then
|
if self.SelectedClass == "warrior" then
|
||||||
warrior.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1)
|
warrior.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1)
|
||||||
@@ -30,7 +30,7 @@ if warrior ~= nil and warrior.SpriteGUIRendererComponent ~= nil then
|
|||||||
warrior.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1)
|
warrior.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local mage = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageButton")
|
local mage = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/MageButton")
|
||||||
if mage ~= nil and mage.SpriteGUIRendererComponent ~= nil then
|
if mage ~= nil and mage.SpriteGUIRendererComponent ~= nil then
|
||||||
if self.SelectedClass == "magician" then
|
if self.SelectedClass == "magician" then
|
||||||
mage.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1)
|
mage.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1)
|
||||||
@@ -38,7 +38,7 @@ if mage ~= nil and mage.SpriteGUIRendererComponent ~= nil then
|
|||||||
mage.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1)
|
mage.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local thief = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefButton")
|
local thief = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/ThiefButton")
|
||||||
if thief ~= nil and thief.SpriteGUIRendererComponent ~= nil then
|
if thief ~= nil and thief.SpriteGUIRendererComponent ~= nil then
|
||||||
if self.SelectedClass == "bandit" then
|
if self.SelectedClass == "bandit" then
|
||||||
thief.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1)
|
thief.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1)
|
||||||
@@ -47,16 +47,16 @@ if thief ~= nil and thief.SpriteGUIRendererComponent ~= nil then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if self.SelectedClass == "warrior" then
|
if self.SelectedClass == "warrior" then
|
||||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "전사 선택됨")
|
self:SetText("/ui/SelectUIGroup/CharacterSelectHud/Status", "전사 선택됨")
|
||||||
elseif self.SelectedClass == "bandit" then
|
elseif self.SelectedClass == "bandit" then
|
||||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "도적 선택됨")
|
self:SetText("/ui/SelectUIGroup/CharacterSelectHud/Status", "도적 선택됨")
|
||||||
elseif self.SelectedClass == "magician" then
|
elseif self.SelectedClass == "magician" then
|
||||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "마법사 선택됨")
|
self:SetText("/ui/SelectUIGroup/CharacterSelectHud/Status", "마법사 선택됨")
|
||||||
else
|
else
|
||||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "직업을 선택하고 시작하세요")
|
self:SetText("/ui/SelectUIGroup/CharacterSelectHud/Status", "직업을 선택하고 시작하세요")
|
||||||
end`),
|
end`),
|
||||||
method('StartNewGame', `if self.SelectedClass ~= "warrior" and self.SelectedClass ~= "bandit" and self.SelectedClass ~= "magician" then
|
method('StartNewGame', `if self.SelectedClass ~= "warrior" and self.SelectedClass ~= "bandit" and self.SelectedClass ~= "magician" then
|
||||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "직업을 먼저 선택하세요")
|
self:SetText("/ui/SelectUIGroup/CharacterSelectHud/Status", "직업을 먼저 선택하세요")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self:StartRun()`),
|
self:StartRun()`),
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ for i = 1, #self.Monsters do
|
|||||||
local m = self.Monsters[i]
|
local m = self.Monsters[i]
|
||||||
local active = false
|
local active = false
|
||||||
if m ~= nil and m.alive == true and i == shownTarget then active = true end
|
if m ~= nil and m.alive == true and i == shownTarget then active = true end
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i) .. "/TargetFrame", active)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i) .. "/TargetFrame", active)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i) .. "/TargetMarker", active and dragActive)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i) .. "/TargetMarker", active and dragActive)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i) .. "/TargetMarker/Label", active and dragActive)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i) .. "/TargetMarker/Label", active and dragActive)
|
||||||
end`),
|
end`),
|
||||||
method('OnCardDragBegin', `if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
|
method('OnCardDragBegin', `if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
|
||||||
return
|
return
|
||||||
@@ -90,7 +90,7 @@ if self.CardHoverTweenId ~= nil and self.CardHoverTweenId ~= 0 then
|
|||||||
self.CardHoverTweenId = 0
|
self.CardHoverTweenId = 0
|
||||||
end
|
end
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i))
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(i))
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
||||||
e.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(i), 0)
|
e.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(i), 0)
|
||||||
@@ -102,7 +102,7 @@ self:RenderTargetFrames()`, [{ Type: 'number', DefaultValue: null, SyncDirection
|
|||||||
method('OnCardDrag', `if self.DragSlot ~= slot then
|
method('OnCardDrag', `if self.DragSlot ~= slot then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot))
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
local ui = _UILogic:ScreenToUIPosition(touchPoint)
|
local ui = _UILogic:ScreenToUIPosition(touchPoint)
|
||||||
e.UITransformComponent.anchoredPosition = Vector2(ui.x, ui.y + 360)
|
e.UITransformComponent.anchoredPosition = Vector2(ui.x, ui.y + 360)
|
||||||
@@ -124,7 +124,7 @@ end`, [
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.DragSlot = 0
|
self.DragSlot = 0
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot))
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
e.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(slot), 0)
|
e.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(slot), 0)
|
||||||
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
||||||
@@ -207,7 +207,7 @@ if m == nil or m.alive ~= true or m.entity == nil or not isvalid(m.entity) then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.FxBusy = true
|
self.FxBusy = true
|
||||||
local fx = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/SkillFx")
|
local fx = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/SkillFx")
|
||||||
if fx ~= nil then
|
if fx ~= nil then
|
||||||
if fx.SpriteGUIRendererComponent ~= nil and image ~= nil and image ~= "" then
|
if fx.SpriteGUIRendererComponent ~= nil and image ~= nil and image ~= "" then
|
||||||
fx.SpriteGUIRendererComponent.ImageRUID = image
|
fx.SpriteGUIRendererComponent.ImageRUID = image
|
||||||
@@ -238,7 +238,7 @@ end, 0.35)`, [
|
|||||||
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pierce' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pierce' },
|
||||||
]),
|
]),
|
||||||
method('PlayAoeFx', `self.FxBusy = true
|
method('PlayAoeFx', `self.FxBusy = true
|
||||||
local fx = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/SkillFx")
|
local fx = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/SkillFx")
|
||||||
if fx ~= nil then
|
if fx ~= nil then
|
||||||
if fx.SpriteGUIRendererComponent ~= nil and image ~= nil and image ~= "" then
|
if fx.SpriteGUIRendererComponent ~= nil and image ~= nil and image ~= "" then
|
||||||
fx.SpriteGUIRendererComponent.ImageRUID = image
|
fx.SpriteGUIRendererComponent.ImageRUID = image
|
||||||
@@ -287,7 +287,7 @@ if m.entity ~= nil and isvalid(m.entity) then
|
|||||||
local ent = m.entity
|
local ent = m.entity
|
||||||
_TimerService:SetTimerOnce(function() if isvalid(ent) then ent:SetVisible(false) end end, 0.4)
|
_TimerService:SetTimerOnce(function() if isvalid(ent) then ent:SetVisible(false) end end, 0.4)
|
||||||
end
|
end
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(slot), false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(slot), false)
|
||||||
for i = 1, #self.Monsters do
|
for i = 1, #self.Monsters do
|
||||||
if self.Monsters[i].alive == true then self.TargetIndex = i; break end
|
if self.Monsters[i].alive == true then self.TargetIndex = i; break end
|
||||||
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||||
@@ -341,7 +341,7 @@ if idx == 0 or self.PlayerHp <= 0 then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local m = self.Monsters[idx]
|
local m = self.Monsters[idx]
|
||||||
local base = "/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(idx)
|
local base = "/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(idx)
|
||||||
self:SetEntityEnabled(base .. "/ActFrame", true)
|
self:SetEntityEnabled(base .. "/ActFrame", true)
|
||||||
_TimerService:SetTimerOnce(function()
|
_TimerService:SetTimerOnce(function()
|
||||||
if m.poison ~= nil and m.poison > 0 then
|
if m.poison ~= nil and m.poison > 0 then
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ for i = #list, 2, -1 do
|
|||||||
\tlocal j = math.random(1, i)
|
\tlocal j = math.random(1, i)
|
||||||
\tlist[i], list[j] = list[j], list[i]
|
\tlist[i], list[j] = list[j], list[i]
|
||||||
end`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'list' }]),
|
end`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'list' }]),
|
||||||
method('BindButtons', `local endTurn = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/EndTurnButton")
|
method('BindButtons', `local endTurn = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/EndTurnButton")
|
||||||
if endTurn ~= nil and endTurn.ButtonComponent ~= nil then
|
if endTurn ~= nil and endTurn.ButtonComponent ~= nil then
|
||||||
if self.EndTurnHandler ~= nil then
|
if self.EndTurnHandler ~= nil then
|
||||||
endTurn:DisconnectEvent(ButtonClickEvent, self.EndTurnHandler)
|
endTurn:DisconnectEvent(ButtonClickEvent, self.EndTurnHandler)
|
||||||
@@ -18,7 +18,7 @@ if endTurn ~= nil and endTurn.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.EndTurnHandler = endTurn:ConnectEvent(ButtonClickEvent, function() self:EndPlayerTurn() end)
|
self.EndTurnHandler = endTurn:ConnectEvent(ButtonClickEvent, function() self:EndPlayerTurn() end)
|
||||||
end
|
end
|
||||||
local drawPile = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/DrawPile")
|
local drawPile = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/DrawPile")
|
||||||
if drawPile ~= nil and drawPile.ButtonComponent ~= nil then
|
if drawPile ~= nil and drawPile.ButtonComponent ~= nil then
|
||||||
if self.DrawPileHandler ~= nil then
|
if self.DrawPileHandler ~= nil then
|
||||||
drawPile:DisconnectEvent(ButtonClickEvent, self.DrawPileHandler)
|
drawPile:DisconnectEvent(ButtonClickEvent, self.DrawPileHandler)
|
||||||
@@ -26,7 +26,7 @@ if drawPile ~= nil and drawPile.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.DrawPileHandler = drawPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("draw") end)
|
self.DrawPileHandler = drawPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("draw") end)
|
||||||
end
|
end
|
||||||
local discardPile = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/DiscardPile")
|
local discardPile = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/DiscardPile")
|
||||||
if discardPile ~= nil and discardPile.ButtonComponent ~= nil then
|
if discardPile ~= nil and discardPile.ButtonComponent ~= nil then
|
||||||
if self.DiscardPileHandler ~= nil then
|
if self.DiscardPileHandler ~= nil then
|
||||||
discardPile:DisconnectEvent(ButtonClickEvent, self.DiscardPileHandler)
|
discardPile:DisconnectEvent(ButtonClickEvent, self.DiscardPileHandler)
|
||||||
@@ -34,7 +34,7 @@ if discardPile ~= nil and discardPile.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.DiscardPileHandler = discardPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("discard") end)
|
self.DiscardPileHandler = discardPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("discard") end)
|
||||||
end
|
end
|
||||||
local exhaustPile = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/ExhaustPile")
|
local exhaustPile = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/ExhaustPile")
|
||||||
if exhaustPile ~= nil and exhaustPile.ButtonComponent ~= nil then
|
if exhaustPile ~= nil and exhaustPile.ButtonComponent ~= nil then
|
||||||
if self.ExhaustPileHandler ~= nil then
|
if self.ExhaustPileHandler ~= nil then
|
||||||
exhaustPile:DisconnectEvent(ButtonClickEvent, self.ExhaustPileHandler)
|
exhaustPile:DisconnectEvent(ButtonClickEvent, self.ExhaustPileHandler)
|
||||||
@@ -42,7 +42,7 @@ if exhaustPile ~= nil and exhaustPile.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.ExhaustPileHandler = exhaustPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("exhaust") end)
|
self.ExhaustPileHandler = exhaustPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("exhaust") end)
|
||||||
end
|
end
|
||||||
local inspectClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud/Close")
|
local inspectClose = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud/Close")
|
||||||
if inspectClose ~= nil and inspectClose.ButtonComponent ~= nil then
|
if inspectClose ~= nil and inspectClose.ButtonComponent ~= nil then
|
||||||
if self.DeckInspectCloseHandler ~= nil then
|
if self.DeckInspectCloseHandler ~= nil then
|
||||||
inspectClose:DisconnectEvent(ButtonClickEvent, self.DeckInspectCloseHandler)
|
inspectClose:DisconnectEvent(ButtonClickEvent, self.DeckInspectCloseHandler)
|
||||||
@@ -50,7 +50,7 @@ if inspectClose ~= nil and inspectClose.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.DeckInspectCloseHandler = inspectClose:ConnectEvent(ButtonClickEvent, function() self:CloseDeckInspect() end)
|
self.DeckInspectCloseHandler = inspectClose:ConnectEvent(ButtonClickEvent, function() self:CloseDeckInspect() end)
|
||||||
end
|
end
|
||||||
local allDeckButton = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TopBar/AllDeckButton")
|
local allDeckButton = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TopBar/AllDeckButton")
|
||||||
if allDeckButton ~= nil and allDeckButton.ButtonComponent ~= nil then
|
if allDeckButton ~= nil and allDeckButton.ButtonComponent ~= nil then
|
||||||
if self.AllDeckHandler ~= nil then
|
if self.AllDeckHandler ~= nil then
|
||||||
allDeckButton:DisconnectEvent(ButtonClickEvent, self.AllDeckHandler)
|
allDeckButton:DisconnectEvent(ButtonClickEvent, self.AllDeckHandler)
|
||||||
@@ -58,7 +58,7 @@ if allDeckButton ~= nil and allDeckButton.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.AllDeckHandler = allDeckButton:ConnectEvent(ButtonClickEvent, function() self:OpenAllDeck() end)
|
self.AllDeckHandler = allDeckButton:ConnectEvent(ButtonClickEvent, function() self:OpenAllDeck() end)
|
||||||
end
|
end
|
||||||
local allDeckClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Close")
|
local allDeckClose = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close")
|
||||||
if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
||||||
if self.AllDeckCloseHandler ~= nil then
|
if self.AllDeckCloseHandler ~= nil then
|
||||||
allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
||||||
@@ -68,9 +68,9 @@ if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self:BindClassDeckTabs()
|
self:BindClassDeckTabs()
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
local cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i))
|
local cardEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(i))
|
||||||
if cardEntity ~= nil and cardEntity.UITouchReceiveComponent ~= nil then
|
if cardEntity ~= nil and cardEntity.UITouchReceiveComponent ~= nil then
|
||||||
local cardPath = "/ui/DefaultGroup/CardHand/Card" .. tostring(i)
|
local cardPath = "/ui/RunUIGroup/CardHand/Card" .. tostring(i)
|
||||||
cardEntity:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
cardEntity:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
||||||
cardEntity:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
cardEntity:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
||||||
cardEntity:ConnectEvent(UITouchBeginDragEvent, function(ev) self:OnCardDragBegin(i) end)
|
cardEntity:ConnectEvent(UITouchBeginDragEvent, function(ev) self:OnCardDragBegin(i) end)
|
||||||
@@ -84,17 +84,17 @@ for i = 1, 10 do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local rc = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud/Reward" .. tostring(i))
|
local rc = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud/Reward" .. tostring(i))
|
||||||
if rc ~= nil and rc.ButtonComponent ~= nil then
|
if rc ~= nil and rc.ButtonComponent ~= nil then
|
||||||
rc:ConnectEvent(ButtonClickEvent, function() self:PickReward(i) end)
|
rc:ConnectEvent(ButtonClickEvent, function() self:PickReward(i) end)
|
||||||
if rc.UITouchReceiveComponent ~= nil then
|
if rc.UITouchReceiveComponent ~= nil then
|
||||||
local cardPath = "/ui/DefaultGroup/RewardHud/Reward" .. tostring(i)
|
local cardPath = "/ui/RunUIGroup/RewardHud/Reward" .. tostring(i)
|
||||||
rc:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
rc:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
||||||
rc:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
rc:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local skip = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud/Skip")
|
local skip = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud/Skip")
|
||||||
if skip ~= nil and skip.ButtonComponent ~= nil then
|
if skip ~= nil and skip.ButtonComponent ~= nil then
|
||||||
skip:ConnectEvent(ButtonClickEvent, function() self:PickReward(0) end)
|
skip:ConnectEvent(ButtonClickEvent, function() self:PickReward(0) end)
|
||||||
end
|
end
|
||||||
@@ -107,42 +107,42 @@ end
|
|||||||
table.insert(mapNodeIds, "boss")
|
table.insert(mapNodeIds, "boss")
|
||||||
for i = 1, #mapNodeIds do
|
for i = 1, #mapNodeIds do
|
||||||
local nid = mapNodeIds[i]
|
local nid = mapNodeIds[i]
|
||||||
local mn = _EntityService:GetEntityByPath("/ui/DefaultGroup/MapHud/Node_" .. nid)
|
local mn = _EntityService:GetEntityByPath("/ui/RunUIGroup/MapHud/Node_" .. nid)
|
||||||
if mn ~= nil and mn.ButtonComponent ~= nil then
|
if mn ~= nil and mn.ButtonComponent ~= nil then
|
||||||
mn:ConnectEvent(ButtonClickEvent, function() self:PickNode(nid) end)
|
mn:ConnectEvent(ButtonClickEvent, function() self:PickNode(nid) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local sc = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Card" .. tostring(i))
|
local sc = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Card" .. tostring(i))
|
||||||
if sc ~= nil and sc.ButtonComponent ~= nil then
|
if sc ~= nil and sc.ButtonComponent ~= nil then
|
||||||
sc:ConnectEvent(ButtonClickEvent, function() self:BuyCard(i) end)
|
sc:ConnectEvent(ButtonClickEvent, function() self:BuyCard(i) end)
|
||||||
if sc.UITouchReceiveComponent ~= nil then
|
if sc.UITouchReceiveComponent ~= nil then
|
||||||
local cardPath = "/ui/DefaultGroup/ShopHud/Card" .. tostring(i)
|
local cardPath = "/ui/RunUIGroup/ShopHud/Card" .. tostring(i)
|
||||||
sc:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
sc:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
||||||
sc:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
sc:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local shopLeave = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Leave")
|
local shopLeave = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Leave")
|
||||||
if shopLeave ~= nil and shopLeave.ButtonComponent ~= nil then
|
if shopLeave ~= nil and shopLeave.ButtonComponent ~= nil then
|
||||||
shopLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
shopLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
||||||
end
|
end
|
||||||
local shopRelic = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Relic")
|
local shopRelic = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Relic")
|
||||||
if shopRelic ~= nil and shopRelic.ButtonComponent ~= nil then
|
if shopRelic ~= nil and shopRelic.ButtonComponent ~= nil then
|
||||||
shopRelic:ConnectEvent(ButtonClickEvent, function() self:BuyRelic() end)
|
shopRelic:ConnectEvent(ButtonClickEvent, function() self:BuyRelic() end)
|
||||||
end
|
end
|
||||||
local restLeave = _EntityService:GetEntityByPath("/ui/DefaultGroup/RestHud/Leave")
|
local restLeave = _EntityService:GetEntityByPath("/ui/RunUIGroup/RestHud/Leave")
|
||||||
if restLeave ~= nil and restLeave.ButtonComponent ~= nil then
|
if restLeave ~= nil and restLeave.ButtonComponent ~= nil then
|
||||||
restLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
restLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
||||||
end
|
end
|
||||||
for i = 1, ${MAX_MONSTERS} do
|
for i = 1, ${MAX_MONSTERS} do
|
||||||
local ms = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i))
|
local ms = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i))
|
||||||
if ms ~= nil and ms.ButtonComponent ~= nil then
|
if ms ~= nil and ms.ButtonComponent ~= nil then
|
||||||
ms:ConnectEvent(ButtonClickEvent, function() self:SetTarget(i) end)
|
ms:ConnectEvent(ButtonClickEvent, function() self:SetTarget(i) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
local rs = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TopBar/RelicSlot" .. tostring(i))
|
local rs = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TopBar/RelicSlot" .. tostring(i))
|
||||||
if rs ~= nil and rs.UITouchReceiveComponent ~= nil then
|
if rs ~= nil and rs.UITouchReceiveComponent ~= nil then
|
||||||
local idx = i
|
local idx = i
|
||||||
rs:ConnectEvent(UITouchEnterEvent, function()
|
rs:ConnectEvent(UITouchEnterEvent, function()
|
||||||
@@ -156,7 +156,7 @@ for i = 1, 10 do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
local ps = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TopBar/PotionSlot" .. tostring(i))
|
local ps = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TopBar/PotionSlot" .. tostring(i))
|
||||||
if ps ~= nil and ps.UITouchReceiveComponent ~= nil then
|
if ps ~= nil and ps.UITouchReceiveComponent ~= nil then
|
||||||
local idx = i
|
local idx = i
|
||||||
ps:ConnectEvent(UITouchEnterEvent, function()
|
ps:ConnectEvent(UITouchEnterEvent, function()
|
||||||
@@ -170,41 +170,41 @@ for i = 1, 5 do
|
|||||||
ps:ConnectEvent(UITouchDownEvent, function() self:OpenPotionMenu(idx) end)
|
ps:ConnectEvent(UITouchDownEvent, function() self:OpenPotionMenu(idx) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local pmUse = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/PotionMenu/Use")
|
local pmUse = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/PotionMenu/Use")
|
||||||
if pmUse ~= nil and pmUse.ButtonComponent ~= nil then
|
if pmUse ~= nil and pmUse.ButtonComponent ~= nil then
|
||||||
pmUse:ConnectEvent(ButtonClickEvent, function() self:UsePotion() end)
|
pmUse:ConnectEvent(ButtonClickEvent, function() self:UsePotion() end)
|
||||||
end
|
end
|
||||||
local pmToss = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/PotionMenu/Toss")
|
local pmToss = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/PotionMenu/Toss")
|
||||||
if pmToss ~= nil and pmToss.ButtonComponent ~= nil then
|
if pmToss ~= nil and pmToss.ButtonComponent ~= nil then
|
||||||
pmToss:ConnectEvent(ButtonClickEvent, function() self:TossPotion() end)
|
pmToss:ConnectEvent(ButtonClickEvent, function() self:TossPotion() end)
|
||||||
end
|
end
|
||||||
local pmClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/PotionMenu/Close")
|
local pmClose = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/PotionMenu/Close")
|
||||||
if pmClose ~= nil and pmClose.ButtonComponent ~= nil then
|
if pmClose ~= nil and pmClose.ButtonComponent ~= nil then
|
||||||
pmClose:ConnectEvent(ButtonClickEvent, function() self:ClosePotionMenu() end)
|
pmClose:ConnectEvent(ButtonClickEvent, function() self:ClosePotionMenu() end)
|
||||||
end
|
end
|
||||||
local shopPotion = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Potion")
|
local shopPotion = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Potion")
|
||||||
if shopPotion ~= nil and shopPotion.ButtonComponent ~= nil then
|
if shopPotion ~= nil and shopPotion.ButtonComponent ~= nil then
|
||||||
shopPotion:ConnectEvent(ButtonClickEvent, function() self:BuyPotion() end)
|
shopPotion:ConnectEvent(ButtonClickEvent, function() self:BuyPotion() end)
|
||||||
end
|
end
|
||||||
local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest")
|
local chest = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Chest")
|
||||||
if chest ~= nil and chest.ButtonComponent ~= nil then
|
if chest ~= nil and chest.ButtonComponent ~= nil then
|
||||||
chest:ConnectEvent(ButtonClickEvent, function() self:OpenChest() end)
|
chest:ConnectEvent(ButtonClickEvent, function() self:OpenChest() end)
|
||||||
end
|
end
|
||||||
local treasureLeave = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Leave")
|
local treasureLeave = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Leave")
|
||||||
if treasureLeave ~= nil and treasureLeave.ButtonComponent ~= nil then
|
if treasureLeave ~= nil and treasureLeave.ButtonComponent ~= nil then
|
||||||
treasureLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
treasureLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
||||||
end
|
end
|
||||||
local jcRelic = _EntityService:GetEntityByPath("/ui/DefaultGroup/JobChoiceHud/RelicButton")
|
local jcRelic = _EntityService:GetEntityByPath("/ui/SelectUIGroup/JobChoiceHud/RelicButton")
|
||||||
if jcRelic ~= nil and jcRelic.ButtonComponent ~= nil then
|
if jcRelic ~= nil and jcRelic.ButtonComponent ~= nil then
|
||||||
jcRelic:ConnectEvent(ButtonClickEvent, function() self:PickJobReward("relic") end)
|
jcRelic:ConnectEvent(ButtonClickEvent, function() self:PickJobReward("relic") end)
|
||||||
end
|
end
|
||||||
local jcJob = _EntityService:GetEntityByPath("/ui/DefaultGroup/JobChoiceHud/JobButton")
|
local jcJob = _EntityService:GetEntityByPath("/ui/SelectUIGroup/JobChoiceHud/JobButton")
|
||||||
if jcJob ~= nil and jcJob.ButtonComponent ~= nil then
|
if jcJob ~= nil and jcJob.ButtonComponent ~= nil then
|
||||||
jcJob:ConnectEvent(ButtonClickEvent, function() self:PickJobReward("job") end)
|
jcJob:ConnectEvent(ButtonClickEvent, function() self:PickJobReward("job") end)
|
||||||
end
|
end
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local slotIdx = i
|
local slotIdx = i
|
||||||
local jb = _EntityService:GetEntityByPath("/ui/DefaultGroup/JobSelectHud/Job_slot" .. tostring(i))
|
local jb = _EntityService:GetEntityByPath("/ui/SelectUIGroup/JobSelectHud/Job_slot" .. tostring(i))
|
||||||
if jb ~= nil and jb.ButtonComponent ~= nil then
|
if jb ~= nil and jb.ButtonComponent ~= nil then
|
||||||
jb:ConnectEvent(ButtonClickEvent, function()
|
jb:ConnectEvent(ButtonClickEvent, function()
|
||||||
if self.JobOpts ~= nil and self.JobOpts[slotIdx] ~= nil then
|
if self.JobOpts ~= nil and self.JobOpts[slotIdx] ~= nil then
|
||||||
@@ -333,11 +333,11 @@ for i = 1, #self.DiscardPile do
|
|||||||
end
|
end
|
||||||
self.DiscardPile = {}
|
self.DiscardPile = {}
|
||||||
self:Shuffle(self.DrawPile)`),
|
self:Shuffle(self.DrawPile)`),
|
||||||
method('RenderPiles', `self:SetText("/ui/DefaultGroup/DeckHud/DrawPile/Count", self:FormatNumber(#self.DrawPile))
|
method('RenderPiles', `self:SetText("/ui/RunUIGroup/DeckHud/DrawPile/Count", self:FormatNumber(#self.DrawPile))
|
||||||
self:SetText("/ui/DefaultGroup/DeckHud/DiscardPile/Count", self:FormatNumber(#self.DiscardPile))
|
self:SetText("/ui/RunUIGroup/DeckHud/DiscardPile/Count", self:FormatNumber(#self.DiscardPile))
|
||||||
self:SetText("/ui/DefaultGroup/DeckHud/ExhaustPile/Count", self:FormatNumber(#(self.ExhaustPile or {})))
|
self:SetText("/ui/RunUIGroup/DeckHud/ExhaustPile/Count", self:FormatNumber(#(self.ExhaustPile or {})))
|
||||||
self:SetText("/ui/DefaultGroup/DeckHud/EnergyOrb/Value", string.format("%d", self.Energy) .. "/" .. string.format("%d", self.MaxEnergy))
|
self:SetText("/ui/RunUIGroup/DeckHud/EnergyOrb/Value", string.format("%d", self.Energy) .. "/" .. string.format("%d", self.MaxEnergy))
|
||||||
local inspect = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud")
|
local inspect = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud")
|
||||||
if inspect ~= nil and inspect.Enable == true and self.DeckInspectKind ~= "" then
|
if inspect ~= nil and inspect.Enable == true and self.DeckInspectKind ~= "" then
|
||||||
self:OpenDeckInspect(self.DeckInspectKind)
|
self:OpenDeckInspect(self.DeckInspectKind)
|
||||||
end`),
|
end`),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export const deckViewMethods = [
|
|||||||
method('OpenDeckInspect', `self.DeckInspectKind = kind
|
method('OpenDeckInspect', `self.DeckInspectKind = kind
|
||||||
if self.DeckAllOpen == true then
|
if self.DeckAllOpen == true then
|
||||||
self.DeckAllOpen = false
|
self.DeckAllOpen = false
|
||||||
local allHud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
local allHud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
if allHud ~= nil then
|
if allHud ~= nil then
|
||||||
allHud.Enable = false
|
allHud.Enable = false
|
||||||
end
|
end
|
||||||
@@ -24,12 +24,12 @@ else
|
|||||||
title = "뽑을 덱"
|
title = "뽑을 덱"
|
||||||
end
|
end
|
||||||
self:RenderDeckInspect(pile, title)
|
self:RenderDeckInspect(pile, title)
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = true
|
hud.Enable = true
|
||||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'kind' }]),
|
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'kind' }]),
|
||||||
method('CloseDeckInspect', `self.DeckInspectKind = ""
|
method('CloseDeckInspect', `self.DeckInspectKind = ""
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = false
|
hud.Enable = false
|
||||||
end`),
|
end`),
|
||||||
@@ -41,13 +41,13 @@ local suffix = " (" .. tostring(count) .. ")"
|
|||||||
if count > 60 then
|
if count > 60 then
|
||||||
suffix = suffix .. " - 60장까지 표시"
|
suffix = suffix .. " - 60장까지 표시"
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/DeckInspectHud/Title", title .. suffix)
|
self:SetText("/ui/DeckUIGroup/DeckInspectHud/Title", title .. suffix)
|
||||||
local empty = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud/Empty")
|
local empty = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud/Empty")
|
||||||
if empty ~= nil then
|
if empty ~= nil then
|
||||||
empty.Enable = count <= 0
|
empty.Enable = count <= 0
|
||||||
end
|
end
|
||||||
for i = 1, 60 do
|
for i = 1, 60 do
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud/Grid/Card" .. tostring(i))
|
local e = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud/Grid/Card" .. tostring(i))
|
||||||
if e ~= nil then
|
if e ~= nil then
|
||||||
local cardId = nil
|
local cardId = nil
|
||||||
if pile ~= nil then
|
if pile ~= nil then
|
||||||
@@ -64,11 +64,11 @@ end`, [
|
|||||||
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pile' },
|
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pile' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'title' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'title' },
|
||||||
]),
|
]),
|
||||||
method('ApplyInspectCardVisual', `self:ApplyCardFace("/ui/DefaultGroup/DeckInspectHud/Grid/Card" .. tostring(slot), cardId)`, [
|
method('ApplyInspectCardVisual', `self:ApplyCardFace("/ui/DeckUIGroup/DeckInspectHud/Grid/Card" .. tostring(slot), cardId)`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||||
]),
|
]),
|
||||||
method('BindClassDeckTabs', `local warriorTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/WarriorTab")
|
method('BindClassDeckTabs', `local warriorTab = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/WarriorTab")
|
||||||
if warriorTab ~= nil and warriorTab.ButtonComponent ~= nil then
|
if warriorTab ~= nil and warriorTab.ButtonComponent ~= nil then
|
||||||
if self.WarriorDeckTabHandler ~= nil then
|
if self.WarriorDeckTabHandler ~= nil then
|
||||||
warriorTab:DisconnectEvent(ButtonClickEvent, self.WarriorDeckTabHandler)
|
warriorTab:DisconnectEvent(ButtonClickEvent, self.WarriorDeckTabHandler)
|
||||||
@@ -76,7 +76,7 @@ if warriorTab ~= nil and warriorTab.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.WarriorDeckTabHandler = warriorTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("warrior") end)
|
self.WarriorDeckTabHandler = warriorTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("warrior") end)
|
||||||
end
|
end
|
||||||
local thiefTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/ThiefTab")
|
local thiefTab = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/ThiefTab")
|
||||||
if thiefTab ~= nil and thiefTab.ButtonComponent ~= nil then
|
if thiefTab ~= nil and thiefTab.ButtonComponent ~= nil then
|
||||||
if self.ThiefDeckTabHandler ~= nil then
|
if self.ThiefDeckTabHandler ~= nil then
|
||||||
thiefTab:DisconnectEvent(ButtonClickEvent, self.ThiefDeckTabHandler)
|
thiefTab:DisconnectEvent(ButtonClickEvent, self.ThiefDeckTabHandler)
|
||||||
@@ -84,7 +84,7 @@ if thiefTab ~= nil and thiefTab.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.ThiefDeckTabHandler = thiefTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("bandit") end)
|
self.ThiefDeckTabHandler = thiefTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("bandit") end)
|
||||||
end
|
end
|
||||||
local mageTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/MageTab")
|
local mageTab = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/MageTab")
|
||||||
if mageTab ~= nil and mageTab.ButtonComponent ~= nil then
|
if mageTab ~= nil and mageTab.ButtonComponent ~= nil then
|
||||||
if self.MageDeckTabHandler ~= nil then
|
if self.MageDeckTabHandler ~= nil then
|
||||||
mageTab:DisconnectEvent(ButtonClickEvent, self.MageDeckTabHandler)
|
mageTab:DisconnectEvent(ButtonClickEvent, self.MageDeckTabHandler)
|
||||||
@@ -96,7 +96,7 @@ end`),
|
|||||||
self.ClassDeckMode = true
|
self.ClassDeckMode = true
|
||||||
self.DeckAllOpen = true
|
self.DeckAllOpen = true
|
||||||
self:SetClassDeckTab(className)
|
self:SetClassDeckTab(className)
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = true
|
hud.Enable = true
|
||||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
||||||
@@ -147,9 +147,9 @@ end)
|
|||||||
self:RenderAllDeck()
|
self:RenderAllDeck()
|
||||||
self:RenderClassDeckTabs()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
self:RenderClassDeckTabs()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
||||||
method('RenderClassDeckTabs', `local tabs = {
|
method('RenderClassDeckTabs', `local tabs = {
|
||||||
{ path = "/ui/DefaultGroup/DeckAllHud/WarriorTab", cls = "warrior" },
|
{ path = "/ui/DeckUIGroup/DeckAllHud/WarriorTab", cls = "warrior" },
|
||||||
{ path = "/ui/DefaultGroup/DeckAllHud/ThiefTab", cls = "bandit" },
|
{ path = "/ui/DeckUIGroup/DeckAllHud/ThiefTab", cls = "bandit" },
|
||||||
{ path = "/ui/DefaultGroup/DeckAllHud/MageTab", cls = "magician" },
|
{ path = "/ui/DeckUIGroup/DeckAllHud/MageTab", cls = "magician" },
|
||||||
}
|
}
|
||||||
for i = 1, #tabs do
|
for i = 1, #tabs do
|
||||||
local e = _EntityService:GetEntityByPath(tabs[i].path)
|
local e = _EntityService:GetEntityByPath(tabs[i].path)
|
||||||
@@ -164,7 +164,7 @@ for i = 1, #tabs do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end`),
|
end`),
|
||||||
method('OpenAllDeck', `local inspectHud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud")
|
method('OpenAllDeck', `local inspectHud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud")
|
||||||
if inspectHud ~= nil then
|
if inspectHud ~= nil then
|
||||||
inspectHud.Enable = false
|
inspectHud.Enable = false
|
||||||
end
|
end
|
||||||
@@ -174,12 +174,12 @@ self.ClassDeckClass = ""
|
|||||||
self:RenderClassDeckTabs()
|
self:RenderClassDeckTabs()
|
||||||
self.DeckAllOpen = true
|
self.DeckAllOpen = true
|
||||||
self:RenderAllDeck()
|
self:RenderAllDeck()
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = true
|
hud.Enable = true
|
||||||
end`),
|
end`),
|
||||||
method('CloseAllDeck', `self.DeckAllOpen = false
|
method('CloseAllDeck', `self.DeckAllOpen = false
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = false
|
hud.Enable = false
|
||||||
end
|
end
|
||||||
@@ -204,14 +204,14 @@ elseif self.CodexMode == true then
|
|||||||
title = "카드 도감"
|
title = "카드 도감"
|
||||||
end
|
end
|
||||||
local count = #pile
|
local count = #pile
|
||||||
self:SetText("/ui/DefaultGroup/DeckAllHud/Title", title .. " (" .. tostring(count) .. ")")
|
self:SetText("/ui/DeckUIGroup/DeckAllHud/Title", title .. " (" .. tostring(count) .. ")")
|
||||||
self:RenderClassDeckTabs()
|
self:RenderClassDeckTabs()
|
||||||
local empty = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Empty")
|
local empty = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Empty")
|
||||||
if empty ~= nil then
|
if empty ~= nil then
|
||||||
empty.Enable = count <= 0
|
empty.Enable = count <= 0
|
||||||
end
|
end
|
||||||
for i = 1, 120 do
|
for i = 1, 120 do
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Grid/Card" .. tostring(i))
|
local e = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Grid/Card" .. tostring(i))
|
||||||
if e ~= nil then
|
if e ~= nil then
|
||||||
local cardId = pile[i]
|
local cardId = pile[i]
|
||||||
if cardId == nil then
|
if cardId == nil then
|
||||||
@@ -222,7 +222,7 @@ for i = 1, 120 do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end`),
|
end`),
|
||||||
method('ApplyAllDeckCardVisual', `self:ApplyCardFace("/ui/DefaultGroup/DeckAllHud/Grid/Card" .. tostring(slot), cardId)`, [
|
method('ApplyAllDeckCardVisual', `self:ApplyCardFace("/ui/DeckUIGroup/DeckAllHud/Grid/Card" .. tostring(slot), cardId)`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||||
]),
|
]),
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ if n > 8 then spacing = math.floor(1400 / n) end
|
|||||||
local startX = -((n - 1) * spacing) / 2
|
local startX = -((n - 1) * spacing) / 2
|
||||||
local drawStart = Vector2(-590, 8)
|
local drawStart = Vector2(-590, 8)
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
\tlocal cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i))
|
\tlocal cardEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(i))
|
||||||
\tif cardEntity ~= nil then
|
\tif cardEntity ~= nil then
|
||||||
\t\tlocal cardId = self.Hand[i]
|
\t\tlocal cardId = self.Hand[i]
|
||||||
\t\tif cardId == nil then
|
\t\tif cardId == nil then
|
||||||
@@ -81,11 +81,11 @@ local xs = {}
|
|||||||
local baseY = 0
|
local baseY = 0
|
||||||
local hoverIndex = 0
|
local hoverIndex = 0
|
||||||
local push = 110
|
local push = 110
|
||||||
if string.find(path, "/ui/DefaultGroup/CardHand/Card") == 1 then
|
if string.find(path, "/ui/RunUIGroup/CardHand/Card") == 1 then
|
||||||
if self.DragSlot ~= nil and self.DragSlot > 0 then
|
if self.DragSlot ~= nil and self.DragSlot > 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
prefix = "/ui/DefaultGroup/CardHand/Card"
|
prefix = "/ui/RunUIGroup/CardHand/Card"
|
||||||
count = 0
|
count = 0
|
||||||
if self.Hand ~= nil then count = #self.Hand end
|
if self.Hand ~= nil then count = #self.Hand end
|
||||||
for i = 1, count do
|
for i = 1, count do
|
||||||
@@ -93,14 +93,14 @@ if string.find(path, "/ui/DefaultGroup/CardHand/Card") == 1 then
|
|||||||
end
|
end
|
||||||
baseY = 0
|
baseY = 0
|
||||||
hoverIndex = tonumber(string.match(path, "Card(%d+)")) or 0
|
hoverIndex = tonumber(string.match(path, "Card(%d+)")) or 0
|
||||||
elseif string.find(path, "/ui/DefaultGroup/RewardHud/Reward") == 1 then
|
elseif string.find(path, "/ui/RunUIGroup/RewardHud/Reward") == 1 then
|
||||||
prefix = "/ui/DefaultGroup/RewardHud/Reward"
|
prefix = "/ui/RunUIGroup/RewardHud/Reward"
|
||||||
count = 3
|
count = 3
|
||||||
xs = { -300, 0, 300 }
|
xs = { -300, 0, 300 }
|
||||||
baseY = 0
|
baseY = 0
|
||||||
hoverIndex = tonumber(string.match(path, "Reward(%d+)")) or 0
|
hoverIndex = tonumber(string.match(path, "Reward(%d+)")) or 0
|
||||||
elseif string.find(path, "/ui/DefaultGroup/ShopHud/Card") == 1 then
|
elseif string.find(path, "/ui/RunUIGroup/ShopHud/Card") == 1 then
|
||||||
prefix = "/ui/DefaultGroup/ShopHud/Card"
|
prefix = "/ui/RunUIGroup/ShopHud/Card"
|
||||||
count = 3
|
count = 3
|
||||||
xs = { -300, 0, 300 }
|
xs = { -300, 0, 300 }
|
||||||
baseY = 20
|
baseY = 20
|
||||||
@@ -159,7 +159,7 @@ self.CardHoverTweenId = eventId`, [
|
|||||||
{ 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: 'hover' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'hover' },
|
||||||
]),
|
]),
|
||||||
method('ApplyCardVisual', `self:ApplyCardFace("/ui/DefaultGroup/CardHand/Card" .. tostring(slot), cardId)`, [
|
method('ApplyCardVisual', `self:ApplyCardFace("/ui/RunUIGroup/CardHand/Card" .. tostring(slot), cardId)`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||||
]),
|
]),
|
||||||
@@ -181,7 +181,7 @@ if math.abs(n - math.floor(n)) < 0.00001 then
|
|||||||
return string.format("%d", math.floor(n))
|
return string.format("%d", math.floor(n))
|
||||||
end
|
end
|
||||||
return tostring(n)`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'value' }], 0, 'string'),
|
return tostring(n)`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'value' }], 0, 'string'),
|
||||||
method('AnimateCardFrom', `local cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot))
|
method('AnimateCardFrom', `local cardEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
if cardEntity == nil or cardEntity.UITransformComponent == nil then
|
if cardEntity == nil or cardEntity.UITransformComponent == nil then
|
||||||
\treturn
|
\treturn
|
||||||
end
|
end
|
||||||
@@ -328,13 +328,13 @@ end`, [
|
|||||||
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'triggerSly' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'triggerSly' },
|
||||||
]),
|
]),
|
||||||
method('IsDiscardSelecting', `return self.DiscardSelectRemaining ~= nil and self.DiscardSelectRemaining > 0`, [], 0, 'boolean'),
|
method('IsDiscardSelecting', `return self.DiscardSelectRemaining ~= nil and self.DiscardSelectRemaining > 0`, [], 0, 'boolean'),
|
||||||
method('UpdateDiscardPrompt', `local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/DiscardPrompt")
|
method('UpdateDiscardPrompt', `local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/DiscardPrompt")
|
||||||
if e == nil then
|
if e == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if self:IsDiscardSelecting() == true then
|
if self:IsDiscardSelecting() == true then
|
||||||
local picked = self.DiscardSelectTotal - self.DiscardSelectRemaining
|
local picked = self.DiscardSelectTotal - self.DiscardSelectRemaining
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/DiscardPrompt", "버릴 카드 선택 " .. self:FormatNumber(picked + 1) .. "/" .. self:FormatNumber(self.DiscardSelectTotal))
|
self:SetText("/ui/RunUIGroup/CombatHud/DiscardPrompt", "버릴 카드 선택 " .. self:FormatNumber(picked + 1) .. "/" .. self:FormatNumber(self.DiscardSelectTotal))
|
||||||
e.Enable = true
|
e.Enable = true
|
||||||
else
|
else
|
||||||
e.Enable = false
|
e.Enable = false
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ if self:AddPotion(pid) == true then
|
|||||||
self:Toast("물약 획득: " .. p.name)
|
self:Toast("물약 획득: " .. p.name)
|
||||||
end`),
|
end`),
|
||||||
method('RenderPotions', `for i = 1, 5 do
|
method('RenderPotions', `for i = 1, 5 do
|
||||||
local base = "/ui/DefaultGroup/CombatHud/TopBar/PotionSlot" .. tostring(i)
|
local base = "/ui/RunUIGroup/CombatHud/TopBar/PotionSlot" .. tostring(i)
|
||||||
local e = _EntityService:GetEntityByPath(base)
|
local e = _EntityService:GetEntityByPath(base)
|
||||||
if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
||||||
local pid = nil
|
local pid = nil
|
||||||
@@ -121,11 +121,11 @@ self.PotionMenuSlot = slot
|
|||||||
local pid = self.RunPotions[slot]
|
local pid = self.RunPotions[slot]
|
||||||
local p = self.Potions[pid]
|
local p = self.Potions[pid]
|
||||||
if p ~= nil then
|
if p ~= nil then
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PotionMenu/Title", p.name .. " — " .. p.desc)
|
self:SetText("/ui/RunUIGroup/CombatHud/PotionMenu/Title", p.name .. " — " .. p.desc)
|
||||||
end
|
end
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PotionMenu", true)`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PotionMenu", true)`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||||
method('ClosePotionMenu', `self.PotionMenuSlot = 0
|
method('ClosePotionMenu', `self.PotionMenuSlot = 0
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PotionMenu", false)`),
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PotionMenu", false)`),
|
||||||
method('UsePotion', `if self.PotionMenuSlot <= 0 then
|
method('UsePotion', `if self.PotionMenuSlot <= 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -133,8 +133,8 @@ if self.CombatOver == true or self.TurnBusy == true or self.FxBusy == true then
|
|||||||
self:Toast("지금은 사용할 수 없습니다")
|
self:Toast("지금은 사용할 수 없습니다")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local combat = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud")
|
local combat = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud")
|
||||||
local hand = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand")
|
local hand = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand")
|
||||||
if combat == nil or combat.Enable ~= true or hand == nil or hand.Enable ~= true then
|
if combat == nil or combat.Enable ~= true or hand == nil or hand.Enable ~= true then
|
||||||
self:Toast("전투 중에만 사용할 수 있습니다")
|
self:Toast("전투 중에만 사용할 수 있습니다")
|
||||||
return
|
return
|
||||||
@@ -189,7 +189,7 @@ if self.RunRelics ~= nil then
|
|||||||
count = #self.RunRelics
|
count = #self.RunRelics
|
||||||
end
|
end
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
local base = "/ui/DefaultGroup/CombatHud/TopBar/RelicSlot" .. tostring(i)
|
local base = "/ui/RunUIGroup/CombatHud/TopBar/RelicSlot" .. tostring(i)
|
||||||
local e = _EntityService:GetEntityByPath(base)
|
local e = _EntityService:GetEntityByPath(base)
|
||||||
if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
||||||
local rid = nil
|
local rid = nil
|
||||||
@@ -209,5 +209,5 @@ local of = ""
|
|||||||
if count > 10 then
|
if count > 10 then
|
||||||
of = "+" .. tostring(count - 9)
|
of = "+" .. tostring(count - 9)
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/TopBar/RelicOverflow", of)`),
|
self:SetText("/ui/RunUIGroup/CombatHud/TopBar/RelicOverflow", of)`),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, CARDFRAMES, RARITIES, MAP_
|
|||||||
import { UI_FILE, COMMON_FILE, UI_ROOT, GENERATED_UI_SECTIONS, UI_APPEND_ORDER, DISABLED_STOCK_CONTROLS, TRANSPARENT, DARK, GOLD, ATTACK, DEFEND, SKILL, DAMAGE_DIGIT_RUIDS, DAMAGE_POP_MAX_DIGITS, DAMAGE_POP_DIGIT_W, DAMAGE_POP_DIGIT_H, DAMAGE_POP_DIGIT_SPACING, MAX_MONSTERS, HEAD_OFFSET_Y, HP_BAR_W, WHITE, CARD_NAME_TEXT, CARD_DESC_TEXT, cardFaceLayout, CARD_W, CARD_H, CARD_SPACING, CARD_XS, ALIGN_CENTER, ALIGN_BOTTOM_CENTER, guid, transform, sprite, button, text, scrollLayoutGroup, popupLayerFor, uiOrderFor, displayOrderFor, applySortingOverride, entity, uiPath, sectionRoot, isGeneratedUiEntity, appendUiSection } from '../lib/ui-helpers.mjs';
|
import { UI_FILE, COMMON_FILE, UI_ROOT, GENERATED_UI_SECTIONS, UI_APPEND_ORDER, DISABLED_STOCK_CONTROLS, TRANSPARENT, DARK, GOLD, ATTACK, DEFEND, SKILL, DAMAGE_DIGIT_RUIDS, DAMAGE_POP_MAX_DIGITS, DAMAGE_POP_DIGIT_W, DAMAGE_POP_DIGIT_H, DAMAGE_POP_DIGIT_SPACING, MAX_MONSTERS, HEAD_OFFSET_Y, HP_BAR_W, WHITE, CARD_NAME_TEXT, CARD_DESC_TEXT, cardFaceLayout, CARD_W, CARD_H, CARD_SPACING, CARD_XS, ALIGN_CENTER, ALIGN_BOTTOM_CENTER, guid, transform, sprite, button, text, scrollLayoutGroup, popupLayerFor, uiOrderFor, displayOrderFor, applySortingOverride, entity, uiPath, sectionRoot, isGeneratedUiEntity, appendUiSection } from '../lib/ui-helpers.mjs';
|
||||||
|
|
||||||
export const jobMethods = [
|
export const jobMethods = [
|
||||||
method('ShowJobChoice', `self:SetEntityEnabled("/ui/DefaultGroup/CardHand", false)
|
method('ShowJobChoice', `self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/JobChoiceHud", true)`),
|
self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", true)`),
|
||||||
method('PickJobReward', `self:SetEntityEnabled("/ui/DefaultGroup/JobChoiceHud", false)
|
method('PickJobReward', `self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", false)
|
||||||
if kind == "relic" then
|
if kind == "relic" then
|
||||||
local bid = self:PickNewRelic()
|
local bid = self:PickNewRelic()
|
||||||
if bid ~= "" then
|
if bid ~= "" then
|
||||||
@@ -26,7 +26,7 @@ if opts == nil then
|
|||||||
end
|
end
|
||||||
self.JobOpts = opts
|
self.JobOpts = opts
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local base = "/ui/DefaultGroup/JobSelectHud/Job_slot" .. tostring(i)
|
local base = "/ui/SelectUIGroup/JobSelectHud/Job_slot" .. tostring(i)
|
||||||
local o = opts[i]
|
local o = opts[i]
|
||||||
if o ~= nil then
|
if o ~= nil then
|
||||||
self:SetEntityEnabled(base, true)
|
self:SetEntityEnabled(base, true)
|
||||||
@@ -40,7 +40,7 @@ for i = 1, 3 do
|
|||||||
self:SetEntityEnabled(base, false)
|
self:SetEntityEnabled(base, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/JobSelectHud", true)`),
|
self:SetEntityEnabled("/ui/SelectUIGroup/JobSelectHud", true)`),
|
||||||
method('JobLabel', `if self.PlayerJob ~= "" and self.Jobs ~= nil then
|
method('JobLabel', `if self.PlayerJob ~= "" and self.Jobs ~= nil then
|
||||||
for cls, list in pairs(self.Jobs) do
|
for cls, list in pairs(self.Jobs) do
|
||||||
for i = 1, #list do
|
for i = 1, #list do
|
||||||
@@ -73,7 +73,7 @@ if starter ~= "" then
|
|||||||
self:Toast("2차 전직: " .. self:JobLabel() .. "! 신규 카드 — " .. sc.name)
|
self:Toast("2차 전직: " .. self:JobLabel() .. "! 신규 카드 — " .. sc.name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/Name", self:JobLabel())
|
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Name", self:JobLabel())
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/JobSelectHud", false)
|
self:SetEntityEnabled("/ui/SelectUIGroup/JobSelectHud", false)
|
||||||
self:ContinueAfterBoss()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'jobId' }]),
|
self:ContinueAfterBoss()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'jobId' }]),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ for i = 1, #list do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
return false`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'id' }], 0, 'boolean'),
|
return false`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'id' }], 0, 'boolean'),
|
||||||
method('RenderMapNode', `local base = "/ui/DefaultGroup/MapHud/Node_" .. id
|
method('RenderMapNode', `local base = "/ui/RunUIGroup/MapHud/Node_" .. id
|
||||||
local e = _EntityService:GetEntityByPath(base)
|
local e = _EntityService:GetEntityByPath(base)
|
||||||
if e == nil then
|
if e == nil then
|
||||||
return
|
return
|
||||||
@@ -162,7 +162,7 @@ if node ~= nil then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
for k = 1, 3 do
|
for k = 1, 3 do
|
||||||
local d = _EntityService:GetEntityByPath("/ui/DefaultGroup/MapHud/Dot_" .. dotId .. "_" .. tostring(k))
|
local d = _EntityService:GetEntityByPath("/ui/RunUIGroup/MapHud/Dot_" .. dotId .. "_" .. tostring(k))
|
||||||
if d ~= nil then
|
if d ~= nil then
|
||||||
d.Enable = has
|
d.Enable = has
|
||||||
if has == true and d.SpriteGUIRendererComponent ~= nil then
|
if has == true and d.SpriteGUIRendererComponent ~= nil then
|
||||||
@@ -210,7 +210,7 @@ if self.VisitedNodes == nil then
|
|||||||
self.VisitedNodes = {}
|
self.VisitedNodes = {}
|
||||||
end
|
end
|
||||||
table.insert(self.VisitedNodes, id)
|
table.insert(self.VisitedNodes, id)
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/MapHud")
|
local hud = _EntityService:GetEntityByPath("/ui/RunUIGroup/MapHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = false
|
hud.Enable = false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ return table.concat(parts, " ")`, [
|
|||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'poison' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'poison' },
|
||||||
], 0, 'string'),
|
], 0, 'string'),
|
||||||
method('RenderCombat', `for i = 1, ${MAX_MONSTERS} do
|
method('RenderCombat', `for i = 1, ${MAX_MONSTERS} do
|
||||||
local base = "/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i)
|
local base = "/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i)
|
||||||
local m = self.Monsters[i]
|
local m = self.Monsters[i]
|
||||||
if m ~= nil and m.alive == true then
|
if m ~= nil and m.alive == true then
|
||||||
self:SetEntityEnabled(base, true)
|
self:SetEntityEnabled(base, true)
|
||||||
@@ -64,10 +64,10 @@ return table.concat(parts, " ")`, [
|
|||||||
self:SetEntityEnabled(base, false)
|
self:SetEntityEnabled(base, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/HpText", string.format("%d", self.PlayerHp) .. "/" .. string.format("%d", self.PlayerMaxHp))
|
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/HpText", string.format("%d", self.PlayerHp) .. "/" .. string.format("%d", self.PlayerMaxHp))
|
||||||
self:SetHpBar("/ui/DefaultGroup/CombatHud/PlayerPanel/HpBarFill", self.PlayerHp, self.PlayerMaxHp, 220)
|
self:SetHpBar("/ui/RunUIGroup/CombatHud/PlayerPanel/HpBarFill", self.PlayerHp, self.PlayerMaxHp, 220)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PlayerPanel/BlockBadge", self.PlayerBlock > 0)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PlayerPanel/BlockBadge", self.PlayerBlock > 0)
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/BlockBadge/Value", string.format("%d", self.PlayerBlock))
|
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/BlockBadge/Value", string.format("%d", self.PlayerBlock))
|
||||||
local pb = self:BuffsLabel(self.PlayerStr, self.PlayerWeak, self.PlayerVuln, 0)
|
local pb = self:BuffsLabel(self.PlayerStr, self.PlayerWeak, self.PlayerVuln, 0)
|
||||||
if self.PlayerDex ~= nil and self.PlayerDex > 0 then
|
if self.PlayerDex ~= nil and self.PlayerDex > 0 then
|
||||||
if pb ~= "" then pb = pb .. " " end
|
if pb ~= "" then pb = pb .. " " end
|
||||||
@@ -86,10 +86,10 @@ if self.PlayerPowers ~= nil and #self.PlayerPowers > 0 then
|
|||||||
if pb ~= "" then pb = pb .. " · " end
|
if pb ~= "" then pb = pb .. " · " end
|
||||||
pb = pb .. table.concat(names, " ")
|
pb = pb .. table.concat(names, " ")
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/Buffs", pb)
|
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Buffs", pb)
|
||||||
self:RenderRun()`),
|
self:RenderRun()`),
|
||||||
method('ShowDmgPop', `local slotKey = string.format("%d", math.floor(slot or 0))
|
method('ShowDmgPop', `local slotKey = string.format("%d", math.floor(slot or 0))
|
||||||
local base = "/ui/DefaultGroup/CombatHud/DmgPop" .. slotKey
|
local base = "/ui/RunUIGroup/CombatHud/DmgPop" .. slotKey
|
||||||
local pop = _EntityService:GetEntityByPath(base)
|
local pop = _EntityService:GetEntityByPath(base)
|
||||||
if pop == nil then
|
if pop == nil then
|
||||||
return
|
return
|
||||||
@@ -134,7 +134,7 @@ if m ~= nil and m.entity ~= nil and isvalid(m.entity) and m.entity.TransformComp
|
|||||||
local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y + 0.45}))
|
local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y + 0.45}))
|
||||||
popPos = _UILogic:ScreenToUIPosition(screen)
|
popPos = _UILogic:ScreenToUIPosition(screen)
|
||||||
else
|
else
|
||||||
local slotEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/MonsterSlot" .. slotKey)
|
local slotEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. slotKey)
|
||||||
if slotEntity ~= nil and slotEntity.UITransformComponent ~= nil then
|
if slotEntity ~= nil and slotEntity.UITransformComponent ~= nil then
|
||||||
local sp = slotEntity.UITransformComponent.anchoredPosition
|
local sp = slotEntity.UITransformComponent.anchoredPosition
|
||||||
popPos = Vector2(sp.x, sp.y + 76)
|
popPos = Vector2(sp.x, sp.y + 76)
|
||||||
@@ -169,7 +169,7 @@ end, 0.48)`, [
|
|||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
||||||
]),
|
]),
|
||||||
method('ShowPlayerDmgPop', `local base = "/ui/DefaultGroup/CombatHud/PlayerPanel/DmgPop"
|
method('ShowPlayerDmgPop', `local base = "/ui/RunUIGroup/CombatHud/PlayerPanel/DmgPop"
|
||||||
if amount > 0 then
|
if amount > 0 then
|
||||||
self:SetText(base, "-" .. string.format("%d", amount))
|
self:SetText(base, "-" .. string.format("%d", amount))
|
||||||
else
|
else
|
||||||
@@ -291,7 +291,7 @@ end
|
|||||||
local wp = tr.WorldPosition
|
local wp = tr.WorldPosition
|
||||||
local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y}))
|
local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y}))
|
||||||
local uipos = _UILogic:ScreenToUIPosition(screen)
|
local uipos = _UILogic:ScreenToUIPosition(screen)
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(slot))
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(slot))
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
e.UITransformComponent.anchoredPosition = uipos
|
e.UITransformComponent.anchoredPosition = uipos
|
||||||
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||||
@@ -303,6 +303,6 @@ end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], N
|
|||||||
if self.AscensionLevel > 0 then
|
if self.AscensionLevel > 0 then
|
||||||
floorText = floorText .. " · 승천" .. string.format("%d", self.AscensionLevel)
|
floorText = floorText .. " · 승천" .. string.format("%d", self.AscensionLevel)
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/TopBar/Floor", floorText)
|
self:SetText("/ui/RunUIGroup/CombatHud/TopBar/Floor", floorText)
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/TopBar/Gold", "메소 " .. string.format("%d", self.Gold))`),
|
self:SetText("/ui/RunUIGroup/CombatHud/TopBar/Gold", "메소 " .. string.format("%d", self.Gold))`),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ for id, c in pairs(self.Cards) do
|
|||||||
end
|
end
|
||||||
table.sort(pool)
|
table.sort(pool)
|
||||||
return pool`, [], 0, 'any'),
|
return pool`, [], 0, 'any'),
|
||||||
method('OfferReward', `self:SetEntityEnabled("/ui/DefaultGroup/CardHand", false)
|
method('OfferReward', `self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", false)
|
||||||
local pool = self:CardPool()
|
local pool = self:CardPool()
|
||||||
local byRarity = {}
|
local byRarity = {}
|
||||||
for _, id in ipairs(pool) do
|
for _, id in ipairs(pool) do
|
||||||
@@ -30,11 +30,11 @@ for i = 1, 3 do
|
|||||||
self.RewardChoices[i] = bucket[math.random(1, #bucket)]
|
self.RewardChoices[i] = bucket[math.random(1, #bucket)]
|
||||||
self:ApplyRewardVisual(i, self.RewardChoices[i])
|
self:ApplyRewardVisual(i, self.RewardChoices[i])
|
||||||
end
|
end
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud")
|
local hud = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = true
|
hud.Enable = true
|
||||||
end`),
|
end`),
|
||||||
method('ApplyRewardVisual', `self:ApplyCardFace("/ui/DefaultGroup/RewardHud/Reward" .. tostring(slot), cardId)`, [
|
method('ApplyRewardVisual', `self:ApplyCardFace("/ui/RunUIGroup/RewardHud/Reward" .. tostring(slot), cardId)`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||||
]),
|
]),
|
||||||
@@ -47,7 +47,7 @@ if slot ~= 0 and self.RewardChoices ~= nil then
|
|||||||
table.insert(self.RunDeck, id)
|
table.insert(self.RunDeck, id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud")
|
local hud = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = false
|
hud.Enable = false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -59,11 +59,11 @@ _TimerService:SetTimerOnce(function()
|
|||||||
end, 0.2)`),
|
end, 0.2)`),
|
||||||
method('StartCombat', `self:ShowState("combat")
|
method('StartCombat', `self:ShowState("combat")
|
||||||
self:KickCombatCamera()
|
self:KickCombatCamera()
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/Result", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/Result", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PotionMenu", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PotionMenu", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/TooltipBox", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/TooltipBox", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/DiscardPrompt", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/DiscardPrompt", false)
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/Name", self:JobLabel())
|
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Name", self:JobLabel())
|
||||||
self.MaxEnergy = 3
|
self.MaxEnergy = 3
|
||||||
self.Turn = 0
|
self.Turn = 0
|
||||||
self.PlayerBlock = 0
|
self.PlayerBlock = 0
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ if lp.CurrentMapName == target then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
_TeleportService:TeleportToMapPosition(lp, Vector3(-6, 0.03, 0), target)`),
|
_TeleportService:TeleportToMapPosition(lp, Vector3(-6, 0.03, 0), target)`),
|
||||||
method('ShowResult', `self:SetText("/ui/DefaultGroup/CombatHud/Result", text)
|
method('ShowResult', `self:SetText("/ui/RunUIGroup/CombatHud/Result", text)
|
||||||
local entity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/Result")
|
local entity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/Result")
|
||||||
if entity ~= nil then
|
if entity ~= nil then
|
||||||
entity.Enable = true
|
entity.Enable = true
|
||||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'text' }]),
|
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'text' }]),
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ self.ShopPotion = pkeys[math.random(1, #pkeys)]
|
|||||||
self.ShopPotionBought = false
|
self.ShopPotionBought = false
|
||||||
self:RenderShop()
|
self:RenderShop()
|
||||||
self:ShowState("shop")`),
|
self:ShowState("shop")`),
|
||||||
method('RenderShop', `self:SetText("/ui/DefaultGroup/ShopHud/Gold", "메소 " .. string.format("%d", self.Gold))
|
method('RenderShop', `self:SetText("/ui/RunUIGroup/ShopHud/Gold", "메소 " .. string.format("%d", self.Gold))
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local cid = self.ShopChoices[i]
|
local cid = self.ShopChoices[i]
|
||||||
local c = self.Cards[cid]
|
local c = self.Cards[cid]
|
||||||
local base = "/ui/DefaultGroup/ShopHud/Card" .. tostring(i)
|
local base = "/ui/RunUIGroup/ShopHud/Card" .. tostring(i)
|
||||||
if c ~= nil then
|
if c ~= nil then
|
||||||
self:ApplyCardFace(base, cid)
|
self:ApplyCardFace(base, cid)
|
||||||
self:SetText(base .. "/Price", string.format("%d", ${CARD_PRICE}) .. " 메소")
|
self:SetText(base .. "/Price", string.format("%d", ${CARD_PRICE}) .. " 메소")
|
||||||
@@ -38,9 +38,9 @@ for i = 1, 3 do
|
|||||||
end
|
end
|
||||||
local rr = self.Relics[self.ShopRelic]
|
local rr = self.Relics[self.ShopRelic]
|
||||||
if rr ~= nil then
|
if rr ~= nil then
|
||||||
self:SetText("/ui/DefaultGroup/ShopHud/Relic/Label", rr.name .. " — " .. rr.desc)
|
self:SetText("/ui/RunUIGroup/ShopHud/Relic/Label", rr.name .. " — " .. rr.desc)
|
||||||
self:SetText("/ui/DefaultGroup/ShopHud/Relic/Price", string.format("%d", ${RELIC_PRICE}) .. " 메소")
|
self:SetText("/ui/RunUIGroup/ShopHud/Relic/Price", string.format("%d", ${RELIC_PRICE}) .. " 메소")
|
||||||
local re = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Relic")
|
local re = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Relic")
|
||||||
if re ~= nil and re.SpriteGUIRendererComponent ~= nil then
|
if re ~= nil and re.SpriteGUIRendererComponent ~= nil then
|
||||||
if self.ShopRelicBought == true then
|
if self.ShopRelicBought == true then
|
||||||
re.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)
|
re.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)
|
||||||
@@ -51,9 +51,9 @@ if rr ~= nil then
|
|||||||
end
|
end
|
||||||
local pp = self.Potions[self.ShopPotion]
|
local pp = self.Potions[self.ShopPotion]
|
||||||
if pp ~= nil then
|
if pp ~= nil then
|
||||||
self:SetText("/ui/DefaultGroup/ShopHud/Potion/Label", pp.name .. " — " .. pp.desc)
|
self:SetText("/ui/RunUIGroup/ShopHud/Potion/Label", pp.name .. " — " .. pp.desc)
|
||||||
self:SetText("/ui/DefaultGroup/ShopHud/Potion/Price", string.format("%d", ${POTIONS.shopPrice}) .. " 메소")
|
self:SetText("/ui/RunUIGroup/ShopHud/Potion/Price", string.format("%d", ${POTIONS.shopPrice}) .. " 메소")
|
||||||
local pe = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Potion")
|
local pe = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Potion")
|
||||||
if pe ~= nil and pe.SpriteGUIRendererComponent ~= nil then
|
if pe ~= nil and pe.SpriteGUIRendererComponent ~= nil then
|
||||||
if self.ShopPotionBought == true then
|
if self.ShopPotionBought == true then
|
||||||
pe.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)
|
pe.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)
|
||||||
@@ -106,24 +106,24 @@ if self.PlayerHp > self.PlayerMaxHp then
|
|||||||
self.PlayerHp = self.PlayerMaxHp
|
self.PlayerHp = self.PlayerMaxHp
|
||||||
end
|
end
|
||||||
local healed = self.PlayerHp - old
|
local healed = self.PlayerHp - old
|
||||||
self:SetText("/ui/DefaultGroup/RestHud/Info", "HP " .. string.format("%d", old) .. " → " .. string.format("%d", self.PlayerHp) .. " (+" .. string.format("%d", healed) .. ")")
|
self:SetText("/ui/RunUIGroup/RestHud/Info", "HP " .. string.format("%d", old) .. " → " .. string.format("%d", self.PlayerHp) .. " (+" .. string.format("%d", healed) .. ")")
|
||||||
self:RenderCombat()
|
self:RenderCombat()
|
||||||
self:ShowState("rest")`),
|
self:ShowState("rest")`),
|
||||||
method('LeaveNode', `local s = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud")
|
method('LeaveNode', `local s = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud")
|
||||||
if s ~= nil then
|
if s ~= nil then
|
||||||
s.Enable = false
|
s.Enable = false
|
||||||
end
|
end
|
||||||
local r = _EntityService:GetEntityByPath("/ui/DefaultGroup/RestHud")
|
local r = _EntityService:GetEntityByPath("/ui/RunUIGroup/RestHud")
|
||||||
if r ~= nil then
|
if r ~= nil then
|
||||||
r.Enable = false
|
r.Enable = false
|
||||||
end
|
end
|
||||||
local t = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud")
|
local t = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud")
|
||||||
if t ~= nil then
|
if t ~= nil then
|
||||||
t.Enable = false
|
t.Enable = false
|
||||||
end
|
end
|
||||||
self:ShowMap()`),
|
self:ShowMap()`),
|
||||||
method('ShowTreasure', `self.ChestOpened = false
|
method('ShowTreasure', `self.ChestOpened = false
|
||||||
local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest")
|
local chest = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Chest")
|
||||||
if chest ~= nil then
|
if chest ~= nil then
|
||||||
if chest.SpriteGUIRendererComponent ~= nil then
|
if chest.SpriteGUIRendererComponent ~= nil then
|
||||||
chest.SpriteGUIRendererComponent.ImageRUID = "${CHEST_CLOSED_RUID}"
|
chest.SpriteGUIRendererComponent.ImageRUID = "${CHEST_CLOSED_RUID}"
|
||||||
@@ -132,15 +132,15 @@ if chest ~= nil then
|
|||||||
chest.UITransformComponent.anchoredPosition = Vector2(0, 40)
|
chest.UITransformComponent.anchoredPosition = Vector2(0, 40)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Reward", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Reward", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Hint", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Hint", true)
|
||||||
self:ShowState("treasure")`),
|
self:ShowState("treasure")`),
|
||||||
method('OpenChest', `if self.ChestOpened == true then
|
method('OpenChest', `if self.ChestOpened == true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.ChestOpened = true
|
self.ChestOpened = true
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Hint", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Hint", false)
|
||||||
local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest")
|
local chest = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Chest")
|
||||||
local steps = { 10, -10, 8, -8, 5, 0 }
|
local steps = { 10, -10, 8, -8, 5, 0 }
|
||||||
for i = 1, #steps do
|
for i = 1, #steps do
|
||||||
local dx = steps[i]
|
local dx = steps[i]
|
||||||
@@ -167,7 +167,7 @@ _TimerService:SetTimerOnce(function()
|
|||||||
end
|
end
|
||||||
self.Gold = self.Gold + g
|
self.Gold = self.Gold + g
|
||||||
self:RenderRun()
|
self:RenderRun()
|
||||||
self:SetText("/ui/DefaultGroup/TreasureHud/Reward", msg)
|
self:SetText("/ui/RunUIGroup/TreasureHud/Reward", msg)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Reward", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Reward", true)
|
||||||
end, 0.55)`),
|
end, 0.55)`),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ export const soulMethods = [
|
|||||||
method('ShowSoulShop', `self:RenderSoulLabel()
|
method('ShowSoulShop', `self:RenderSoulLabel()
|
||||||
self:RenderSoulShop()
|
self:RenderSoulShop()
|
||||||
self:BindSoulShopButtons()
|
self:BindSoulShopButtons()
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", true)`),
|
self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", true)`),
|
||||||
method('CloseSoulShop', `self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", false)`),
|
method('CloseSoulShop', `self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)`),
|
||||||
method('ReqLoadSouls', `local ds = _DataStorageService:GetUserDataStorage(userId)
|
method('ReqLoadSouls', `local ds = _DataStorageService:GetUserDataStorage(userId)
|
||||||
local e1, pts = ds:GetAndWait("soulPoints")
|
local e1, pts = ds:GetAndWait("soulPoints")
|
||||||
local e2, unl = ds:GetAndWait("soulUnlocks")
|
local e2, unl = ds:GetAndWait("soulUnlocks")
|
||||||
@@ -63,7 +63,7 @@ self:RenderSoulLabel()
|
|||||||
self:RenderSoulShop()`, [{ Type: "number", DefaultValue: null, SyncDirection: 0, Attributes: [], Name: "slot" }]),
|
self:RenderSoulShop()`, [{ Type: "number", DefaultValue: null, SyncDirection: 0, Attributes: [], Name: "slot" }]),
|
||||||
method('RenderSoulShop', `local defs = self.SoulShopDef or {}
|
method('RenderSoulShop', `local defs = self.SoulShopDef or {}
|
||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
local base = "/ui/DefaultGroup/SoulShopHud/Item" .. tostring(i)
|
local base = "/ui/LobbyUIGroup/SoulShopHud/Item" .. tostring(i)
|
||||||
local d = defs[i]
|
local d = defs[i]
|
||||||
if d == nil then
|
if d == nil then
|
||||||
self:SetEntityEnabled(base, false)
|
self:SetEntityEnabled(base, false)
|
||||||
@@ -87,7 +87,7 @@ end
|
|||||||
self.SoulShopBound = true
|
self.SoulShopBound = true
|
||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
local idx = i
|
local idx = i
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/SoulShopHud/Item" .. tostring(i))
|
local e = _EntityService:GetEntityByPath("/ui/LobbyUIGroup/SoulShopHud/Item" .. tostring(i))
|
||||||
if e ~= nil and e.ButtonComponent ~= nil then
|
if e ~= nil and e.ButtonComponent ~= nil then
|
||||||
e:ConnectEvent(ButtonClickEvent, function() self:BuySoulUnlock(idx) end)
|
e:ConnectEvent(ButtonClickEvent, function() self:BuySoulUnlock(idx) end)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,37 +6,37 @@ export const stateMethods = [
|
|||||||
method('HideGameHud', `self:SetEntityEnabled("/ui/DefaultGroup/Button_Attack", false)
|
method('HideGameHud', `self:SetEntityEnabled("/ui/DefaultGroup/Button_Attack", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/Button_Jump", false)
|
self:SetEntityEnabled("/ui/DefaultGroup/Button_Jump", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/UIJoystick", false)
|
self:SetEntityEnabled("/ui/DefaultGroup/UIJoystick", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CardHand", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/RewardHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/RewardHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/MapHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/MapHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/ShopHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/ShopHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/RestHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/RestHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/JobChoiceHud", false)
|
self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/JobSelectHud", false)
|
self:SetEntityEnabled("/ui/SelectUIGroup/JobSelectHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckInspectHud", false)
|
self:SetEntityEnabled("/ui/DeckUIGroup/DeckInspectHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckAllHud", false)
|
self:SetEntityEnabled("/ui/DeckUIGroup/DeckAllHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/LobbyHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", false)`),
|
self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)`),
|
||||||
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/DefaultGroup/CharacterSelectHud", state == "charselect")
|
self:SetEntityEnabled("/ui/SelectUIGroup/CharacterSelectHud", state == "charselect")
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/LobbyHud", state == "lobby")
|
self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", state == "lobby")
|
||||||
if state == "map" then
|
if state == "map" then
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/MapHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/MapHud", true)
|
||||||
elseif state == "combat" then
|
elseif state == "combat" then
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud", true)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", true)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CardHand", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/CardHand", true)
|
||||||
elseif state == "shop" then
|
elseif state == "shop" then
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/ShopHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/ShopHud", true)
|
||||||
elseif state == "rest" then
|
elseif state == "rest" then
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/RestHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/RestHud", true)
|
||||||
elseif state == "treasure" then
|
elseif state == "treasure" then
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud", true)
|
||||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'state' }]),
|
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'state' }]),
|
||||||
method('ShowMainMenu', `self.SelectedClass = ""
|
method('ShowMainMenu', `self.SelectedClass = ""
|
||||||
self:RenderAscension()
|
self:RenderAscension()
|
||||||
@@ -53,7 +53,7 @@ if buttonEntity ~= nil and buttonEntity.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, function() self:ShowCharacterSelect() end)
|
self.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, function() self:ShowCharacterSelect() end)
|
||||||
end
|
end
|
||||||
local warrior = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/WarriorButton")
|
local warrior = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/WarriorButton")
|
||||||
if warrior ~= nil and warrior.ButtonComponent ~= nil then
|
if warrior ~= nil and warrior.ButtonComponent ~= nil then
|
||||||
if self.WarriorSelectHandler ~= nil then
|
if self.WarriorSelectHandler ~= nil then
|
||||||
warrior:DisconnectEvent(ButtonClickEvent, self.WarriorSelectHandler)
|
warrior:DisconnectEvent(ButtonClickEvent, self.WarriorSelectHandler)
|
||||||
@@ -61,7 +61,7 @@ if warrior ~= nil and warrior.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.WarriorSelectHandler = warrior:ConnectEvent(ButtonClickEvent, function() self:SelectClass("warrior") end)
|
self.WarriorSelectHandler = warrior:ConnectEvent(ButtonClickEvent, function() self:SelectClass("warrior") end)
|
||||||
end
|
end
|
||||||
local thief = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefButton")
|
local thief = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/ThiefButton")
|
||||||
if thief ~= nil and thief.ButtonComponent ~= nil then
|
if thief ~= nil and thief.ButtonComponent ~= nil then
|
||||||
if self.ThiefSelectHandler ~= nil then
|
if self.ThiefSelectHandler ~= nil then
|
||||||
thief:DisconnectEvent(ButtonClickEvent, self.ThiefSelectHandler)
|
thief:DisconnectEvent(ButtonClickEvent, self.ThiefSelectHandler)
|
||||||
@@ -69,7 +69,7 @@ if thief ~= nil and thief.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.ThiefSelectHandler = thief:ConnectEvent(ButtonClickEvent, function() self:SelectClass("bandit") end)
|
self.ThiefSelectHandler = thief:ConnectEvent(ButtonClickEvent, function() self:SelectClass("bandit") end)
|
||||||
end
|
end
|
||||||
local mage = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageButton")
|
local mage = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/MageButton")
|
||||||
if mage ~= nil and mage.ButtonComponent ~= nil then
|
if mage ~= nil and mage.ButtonComponent ~= nil then
|
||||||
if self.MageSelectHandler ~= nil then
|
if self.MageSelectHandler ~= nil then
|
||||||
mage:DisconnectEvent(ButtonClickEvent, self.MageSelectHandler)
|
mage:DisconnectEvent(ButtonClickEvent, self.MageSelectHandler)
|
||||||
@@ -77,7 +77,7 @@ if mage ~= nil and mage.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.MageSelectHandler = mage:ConnectEvent(ButtonClickEvent, function() self:SelectClass("magician") end)
|
self.MageSelectHandler = mage:ConnectEvent(ButtonClickEvent, function() self:SelectClass("magician") end)
|
||||||
end
|
end
|
||||||
local allDeckClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Close")
|
local allDeckClose = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close")
|
||||||
if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
||||||
if self.AllDeckCloseHandler ~= nil then
|
if self.AllDeckCloseHandler ~= nil then
|
||||||
allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
||||||
@@ -86,7 +86,7 @@ if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
|||||||
self.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
self.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
||||||
end
|
end
|
||||||
self:BindClassDeckTabs()
|
self:BindClassDeckTabs()
|
||||||
local start = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/StartButton")
|
local start = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/StartButton")
|
||||||
if start ~= nil and start.ButtonComponent ~= nil then
|
if start ~= nil and start.ButtonComponent ~= nil then
|
||||||
if self.StartGameHandler ~= nil then
|
if self.StartGameHandler ~= nil then
|
||||||
start:DisconnectEvent(ButtonClickEvent, self.StartGameHandler)
|
start:DisconnectEvent(ButtonClickEvent, self.StartGameHandler)
|
||||||
@@ -94,7 +94,7 @@ if start ~= nil and start.ButtonComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self.StartGameHandler = start:ConnectEvent(ButtonClickEvent, function() self:StartNewGame() end)
|
self.StartGameHandler = start:ConnectEvent(ButtonClickEvent, function() self:StartNewGame() end)
|
||||||
end
|
end
|
||||||
local charBack = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/BackButton")
|
local charBack = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/BackButton")
|
||||||
if charBack ~= nil and charBack.ButtonComponent ~= nil then
|
if charBack ~= nil and charBack.ButtonComponent ~= nil then
|
||||||
if self.CharBackHandler ~= nil then
|
if self.CharBackHandler ~= nil then
|
||||||
charBack:DisconnectEvent(ButtonClickEvent, self.CharBackHandler)
|
charBack:DisconnectEvent(ButtonClickEvent, self.CharBackHandler)
|
||||||
@@ -122,8 +122,8 @@ end`),
|
|||||||
self:RenderAscension()
|
self:RenderAscension()
|
||||||
self:RenderSoulLabel()
|
self:RenderSoulLabel()
|
||||||
self:ShowState("lobby")
|
self:ShowState("lobby")
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)
|
||||||
self:BindLobbyButtons()
|
self:BindLobbyButtons()
|
||||||
self:BindMenuButtons()
|
self:BindMenuButtons()
|
||||||
self:GoLobbyMap()`),
|
self:GoLobbyMap()`),
|
||||||
@@ -155,8 +155,8 @@ elseif id == "board" then
|
|||||||
self:ShowBoard()
|
self:ShowBoard()
|
||||||
end`, [{ Type: 'string', DefaultValue: '""', SyncDirection: 0, Attributes: [], Name: 'id' }]),
|
end`, [{ Type: 'string', DefaultValue: '""', SyncDirection: 0, Attributes: [], Name: 'id' }]),
|
||||||
method('RenderSoulLabel', `local s = self.SoulPoints or 0
|
method('RenderSoulLabel', `local s = self.SoulPoints or 0
|
||||||
self:SetText("/ui/DefaultGroup/LobbyHud/SoulLabel", "영혼 " .. string.format("%d", s))
|
self:SetText("/ui/LobbyUIGroup/LobbyHud/SoulLabel", "영혼 " .. string.format("%d", s))
|
||||||
self:SetText("/ui/DefaultGroup/SoulShopHud/Souls", "영혼 " .. string.format("%d", s))`),
|
self:SetText("/ui/LobbyUIGroup/SoulShopHud/Souls", "영혼 " .. string.format("%d", s))`),
|
||||||
method('BindLobbyButtons', `if self.LobbyBound == true then
|
method('BindLobbyButtons', `if self.LobbyBound == true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -167,13 +167,13 @@ local function bindClick(path, fn)
|
|||||||
e:ConnectEvent(ButtonClickEvent, fn)
|
e:ConnectEvent(ButtonClickEvent, fn)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
bindClick("/ui/DefaultGroup/LobbyHud/AscMinus", function() self:AdjustAscension(-1) end)
|
bindClick("/ui/LobbyUIGroup/LobbyHud/AscMinus", function() self:AdjustAscension(-1) end)
|
||||||
bindClick("/ui/DefaultGroup/LobbyHud/AscPlus", function() self:AdjustAscension(1) end)
|
bindClick("/ui/LobbyUIGroup/LobbyHud/AscPlus", function() self:AdjustAscension(1) end)
|
||||||
bindClick("/ui/DefaultGroup/BoardHud/Close", function() self:CloseBoard() end)
|
bindClick("/ui/LobbyUIGroup/BoardHud/Close", function() self:CloseBoard() end)
|
||||||
bindClick("/ui/DefaultGroup/SoulShopHud/Close", function() self:CloseSoulShop() end)`),
|
bindClick("/ui/LobbyUIGroup/SoulShopHud/Close", function() self:CloseSoulShop() end)`),
|
||||||
method('ShowCodex', `self.CodexMode = true
|
method('ShowCodex', `self.CodexMode = true
|
||||||
self.ClassDeckMode = true
|
self.ClassDeckMode = true
|
||||||
local close = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Close")
|
local close = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close")
|
||||||
if close ~= nil and close.ButtonComponent ~= nil then
|
if close ~= nil and close.ButtonComponent ~= nil then
|
||||||
if self.AllDeckCloseHandler ~= nil then
|
if self.AllDeckCloseHandler ~= nil then
|
||||||
close:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
close:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
||||||
@@ -181,13 +181,13 @@ if close ~= nil and close.ButtonComponent ~= nil then
|
|||||||
self.AllDeckCloseHandler = close:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
self.AllDeckCloseHandler = close:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
||||||
end
|
end
|
||||||
self:BindClassDeckTabs()
|
self:BindClassDeckTabs()
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/LobbyHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", false)
|
||||||
self:SetClassDeckTab("warrior")
|
self:SetClassDeckTab("warrior")
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = true
|
hud.Enable = true
|
||||||
end
|
end
|
||||||
self:RenderAllDeck()`),
|
self:RenderAllDeck()`),
|
||||||
method('ShowBoard', `self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", true)`),
|
method('ShowBoard', `self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", true)`),
|
||||||
method('CloseBoard', `self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", false)`),
|
method('CloseBoard', `self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false)`),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ local cardId = self.Hand[slot]
|
|||||||
if cardId == nil then
|
if cardId == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot))
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
local tx = 0
|
local tx = 0
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
tx = e.UITransformComponent.anchoredPosition.x
|
tx = e.UITransformComponent.anchoredPosition.x
|
||||||
@@ -87,7 +87,7 @@ if c ~= nil then
|
|||||||
self:HideTooltip()
|
self:HideTooltip()
|
||||||
end
|
end
|
||||||
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||||
method('UnhoverCard', `local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot))
|
method('UnhoverCard', `local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
||||||
end
|
end
|
||||||
@@ -97,9 +97,9 @@ self:HideTooltip()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, At
|
|||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'desc' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'desc' },
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'x' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'x' },
|
||||||
]),
|
]),
|
||||||
method('ShowTooltipAt', `self:SetText("/ui/DefaultGroup/CombatHud/TooltipBox/Name", name)
|
method('ShowTooltipAt', `self:SetText("/ui/RunUIGroup/CombatHud/TooltipBox/Name", name)
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/TooltipBox/Desc", desc)
|
self:SetText("/ui/RunUIGroup/CombatHud/TooltipBox/Desc", desc)
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TooltipBox")
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TooltipBox")
|
||||||
if e ~= nil then
|
if e ~= nil then
|
||||||
if e.UITransformComponent ~= nil then
|
if e.UITransformComponent ~= nil then
|
||||||
e.UITransformComponent.anchoredPosition = Vector2(x, y)
|
e.UITransformComponent.anchoredPosition = Vector2(x, y)
|
||||||
@@ -111,5 +111,5 @@ end`, [
|
|||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'x' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'x' },
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'y' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'y' },
|
||||||
]),
|
]),
|
||||||
method('HideTooltip', `self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/TooltipBox", false)`),
|
method('HideTooltip', `self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/TooltipBox", false)`),
|
||||||
];
|
];
|
||||||
|
|||||||
28
tools/deck/reconnect-ui-paths.mjs
Normal file
28
tools/deck/reconnect-ui-paths.mjs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import { readFileSync, writeFileSync, readdirSync } from 'node:fs';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
|
||||||
|
// 일회성·멱등 마이그레이션: cb/*.mjs의 UI 경로 리터럴을 메이커 재편 UIGroup으로 재연결.
|
||||||
|
// 이미 이동된 경로는 매치 안 됨(멱등). MainMenu·Button_Attack/Jump·UIJoystick(=DefaultGroup 잔류)은 미변경.
|
||||||
|
// 섹션→UIGroup 매핑은 tools/verify/uimap.mjs 탐색으로 검증된 실제 .ui 분포 기준.
|
||||||
|
const MOVE = {
|
||||||
|
CharacterSelectHud: 'SelectUIGroup', JobChoiceHud: 'SelectUIGroup', JobSelectHud: 'SelectUIGroup',
|
||||||
|
LobbyHud: 'LobbyUIGroup', BoardHud: 'LobbyUIGroup', SoulShopHud: 'LobbyUIGroup',
|
||||||
|
CombatHud: 'RunUIGroup', DeckHud: 'RunUIGroup', CardHand: 'RunUIGroup', MapHud: 'RunUIGroup',
|
||||||
|
RewardHud: 'RunUIGroup', ShopHud: 'RunUIGroup', RestHud: 'RunUIGroup', TreasureHud: 'RunUIGroup',
|
||||||
|
DeckInspectHud: 'DeckUIGroup', DeckAllHud: 'DeckUIGroup',
|
||||||
|
};
|
||||||
|
const CB_DIR = 'tools/deck/cb';
|
||||||
|
let n = 0;
|
||||||
|
for (const f of readdirSync(CB_DIR).filter((x) => x.endsWith('.mjs'))) {
|
||||||
|
const p = join(CB_DIR, f);
|
||||||
|
const before = readFileSync(p, 'utf8');
|
||||||
|
let s = before;
|
||||||
|
// 1) 몬스터 슬롯: 그룹+이름 동시 (CombatHud 일반 remap보다 먼저). 슬롯 5→4는 MAX_MONSTERS(=4)가 이미 반영.
|
||||||
|
s = s.split('/ui/DefaultGroup/CombatHud/MonsterSlot').join('/ui/RunUIGroup/CombatHud/MonsterStatus');
|
||||||
|
// 2) 섹션별 그룹 접두사 remap
|
||||||
|
for (const [section, group] of Object.entries(MOVE)) {
|
||||||
|
s = s.split(`/ui/DefaultGroup/${section}`).join(`/ui/${group}/${section}`);
|
||||||
|
}
|
||||||
|
if (s !== before) { writeFileSync(p, s, 'utf8'); n++; console.log(' remapped', f); }
|
||||||
|
}
|
||||||
|
console.log(`reconnect-ui-paths: ${n} files updated`);
|
||||||
Reference in New Issue
Block a user