carddeck(B): CombatHud 적 패널 정렬·정수 표기 수정
런타임 검증에서 발견된 시각 결함 2건 수정.
- 적 텍스트(이름/HP/방어/의도)를 EnemyBg 패널(y=300) 위로 정렬 (기존 center 배치로 패널과 분리됨)
- HP/방어/에너지 등 codeblock number Property를 string.format("%d")로 정수 표기 (Lua tostring의 .0 제거)
생성기 단일 소스에서 재생성. 메이커 Play로 정렬·정수 갱신 확인.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -309,7 +309,7 @@
|
|||||||
"Name": null
|
"Name": null
|
||||||
},
|
},
|
||||||
"Arguments": [],
|
"Arguments": [],
|
||||||
"Code": "self:SetText(\"/ui/DefaultGroup/DeckHud/DrawPile/Count\", tostring(#self.DrawPile))\nself:SetText(\"/ui/DefaultGroup/DeckHud/DiscardPile/Count\", tostring(#self.DiscardPile))\nself:SetText(\"/ui/DefaultGroup/DeckHud/Energy\", \"에너지 \" .. tostring(self.Energy) .. \"/\" .. tostring(self.MaxEnergy))",
|
"Code": "self:SetText(\"/ui/DefaultGroup/DeckHud/DrawPile/Count\", tostring(#self.DrawPile))\nself:SetText(\"/ui/DefaultGroup/DeckHud/DiscardPile/Count\", tostring(#self.DiscardPile))\nself:SetText(\"/ui/DefaultGroup/DeckHud/Energy\", \"에너지 \" .. string.format(\"%d\", self.Energy) .. \"/\" .. string.format(\"%d\", self.MaxEnergy))",
|
||||||
"Scope": 2,
|
"Scope": 2,
|
||||||
"ExecSpace": 6,
|
"ExecSpace": 6,
|
||||||
"Attributes": [],
|
"Attributes": [],
|
||||||
@@ -596,7 +596,7 @@
|
|||||||
"Name": null
|
"Name": null
|
||||||
},
|
},
|
||||||
"Arguments": [],
|
"Arguments": [],
|
||||||
"Code": "self:SetText(\"/ui/DefaultGroup/CombatHud/EnemyName\", self.EnemyName)\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyHp\", \"HP \" .. tostring(self.EnemyHp) .. \"/\" .. tostring(self.EnemyMaxHp))\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyBlock\", \"방어 \" .. tostring(self.EnemyBlock))\nlocal intent = self.EnemyIntents[self.EnemyIntentIndex]\nlocal intentText = \"\"\nif intent ~= nil then\n\tif intent.kind == \"Attack\" then\n\t\tintentText = \"의도: 공격 \" .. tostring(intent.value)\n\telseif intent.kind == \"Defend\" then\n\t\tintentText = \"의도: 방어 \" .. tostring(intent.value)\n\tend\nend\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyIntent\", intentText)\nself:SetText(\"/ui/DefaultGroup/CombatHud/PlayerHp\", \"HP \" .. tostring(self.PlayerHp) .. \"/\" .. tostring(self.PlayerMaxHp))\nself:SetText(\"/ui/DefaultGroup/CombatHud/PlayerBlock\", \"방어 \" .. tostring(self.PlayerBlock))",
|
"Code": "self:SetText(\"/ui/DefaultGroup/CombatHud/EnemyName\", self.EnemyName)\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyHp\", \"HP \" .. string.format(\"%d\", self.EnemyHp) .. \"/\" .. string.format(\"%d\", self.EnemyMaxHp))\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyBlock\", \"방어 \" .. string.format(\"%d\", self.EnemyBlock))\nlocal intent = self.EnemyIntents[self.EnemyIntentIndex]\nlocal intentText = \"\"\nif intent ~= nil then\n\tif intent.kind == \"Attack\" then\n\t\tintentText = \"의도: 공격 \" .. tostring(intent.value)\n\telseif intent.kind == \"Defend\" then\n\t\tintentText = \"의도: 방어 \" .. tostring(intent.value)\n\tend\nend\nself:SetText(\"/ui/DefaultGroup/CombatHud/EnemyIntent\", intentText)\nself:SetText(\"/ui/DefaultGroup/CombatHud/PlayerHp\", \"HP \" .. string.format(\"%d\", self.PlayerHp) .. \"/\" .. string.format(\"%d\", self.PlayerMaxHp))\nself:SetText(\"/ui/DefaultGroup/CombatHud/PlayerBlock\", \"방어 \" .. string.format(\"%d\", self.PlayerBlock))",
|
||||||
"Scope": 2,
|
"Scope": 2,
|
||||||
"ExecSpace": 6,
|
"ExecSpace": 6,
|
||||||
"Attributes": [],
|
"Attributes": [],
|
||||||
|
|||||||
@@ -360,10 +360,10 @@ function upsertUi() {
|
|||||||
],
|
],
|
||||||
}));
|
}));
|
||||||
const enemyTexts = [
|
const enemyTexts = [
|
||||||
['EnemyName', { x: 0, y: 58 }, { x: 360, y: 44 }, '슬라임', 28, true, GOLD],
|
['EnemyName', { x: 0, y: 358 }, { x: 360, y: 44 }, '슬라임', 28, true, GOLD],
|
||||||
['EnemyHp', { x: 0, y: 16 }, { x: 360, y: 40 }, 'HP 45/45', 24, true, { r: 1, g: 1, b: 1, a: 1 }],
|
['EnemyHp', { x: 0, y: 316 }, { x: 360, y: 40 }, 'HP 45/45', 24, true, { r: 1, g: 1, b: 1, a: 1 }],
|
||||||
['EnemyBlock', { x: 0, y: -20 }, { x: 360, y: 36 }, '방어 0', 20, false, { r: 0.6, g: 0.8, b: 1, a: 1 }],
|
['EnemyBlock', { x: 0, y: 280 }, { x: 360, y: 36 }, '방어 0', 20, false, { r: 0.6, g: 0.8, b: 1, a: 1 }],
|
||||||
['EnemyIntent', { x: 0, y: -56 }, { x: 360, y: 38 }, '의도: 공격 10', 22, true, { r: 1, g: 0.72, b: 0.5, a: 1 }],
|
['EnemyIntent', { x: 0, y: 244 }, { x: 360, y: 38 }, '의도: 공격 10', 22, true, { r: 1, g: 0.72, b: 0.5, a: 1 }],
|
||||||
];
|
];
|
||||||
let cmbN = 2;
|
let cmbN = 2;
|
||||||
for (const [suffix, pos, size, value, fontSize, bold, color] of enemyTexts) {
|
for (const [suffix, pos, size, value, fontSize, bold, color] of enemyTexts) {
|
||||||
@@ -597,7 +597,7 @@ self.DiscardPile = {}
|
|||||||
self:Shuffle(self.DrawPile)`),
|
self:Shuffle(self.DrawPile)`),
|
||||||
method('RenderPiles', `self:SetText("/ui/DefaultGroup/DeckHud/DrawPile/Count", tostring(#self.DrawPile))
|
method('RenderPiles', `self:SetText("/ui/DefaultGroup/DeckHud/DrawPile/Count", tostring(#self.DrawPile))
|
||||||
self:SetText("/ui/DefaultGroup/DeckHud/DiscardPile/Count", tostring(#self.DiscardPile))
|
self:SetText("/ui/DefaultGroup/DeckHud/DiscardPile/Count", tostring(#self.DiscardPile))
|
||||||
self:SetText("/ui/DefaultGroup/DeckHud/Energy", "에너지 " .. tostring(self.Energy) .. "/" .. tostring(self.MaxEnergy))`),
|
self:SetText("/ui/DefaultGroup/DeckHud/Energy", "에너지 " .. string.format("%d", self.Energy) .. "/" .. string.format("%d", self.MaxEnergy))`),
|
||||||
method('RenderHand', `local drawStart = Vector2(-590, 8)
|
method('RenderHand', `local drawStart = Vector2(-590, 8)
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
\tlocal cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i))
|
\tlocal cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i))
|
||||||
@@ -747,8 +747,8 @@ 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' }]),
|
||||||
method('RenderCombat', `self:SetText("/ui/DefaultGroup/CombatHud/EnemyName", self.EnemyName)
|
method('RenderCombat', `self:SetText("/ui/DefaultGroup/CombatHud/EnemyName", self.EnemyName)
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/EnemyHp", "HP " .. tostring(self.EnemyHp) .. "/" .. tostring(self.EnemyMaxHp))
|
self:SetText("/ui/DefaultGroup/CombatHud/EnemyHp", "HP " .. string.format("%d", self.EnemyHp) .. "/" .. string.format("%d", self.EnemyMaxHp))
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/EnemyBlock", "방어 " .. tostring(self.EnemyBlock))
|
self:SetText("/ui/DefaultGroup/CombatHud/EnemyBlock", "방어 " .. string.format("%d", self.EnemyBlock))
|
||||||
local intent = self.EnemyIntents[self.EnemyIntentIndex]
|
local intent = self.EnemyIntents[self.EnemyIntentIndex]
|
||||||
local intentText = ""
|
local intentText = ""
|
||||||
if intent ~= nil then
|
if intent ~= nil then
|
||||||
@@ -759,8 +759,8 @@ if intent ~= nil then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/EnemyIntent", intentText)
|
self:SetText("/ui/DefaultGroup/CombatHud/EnemyIntent", intentText)
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerHp", "HP " .. tostring(self.PlayerHp) .. "/" .. tostring(self.PlayerMaxHp))
|
self:SetText("/ui/DefaultGroup/CombatHud/PlayerHp", "HP " .. string.format("%d", self.PlayerHp) .. "/" .. string.format("%d", self.PlayerMaxHp))
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerBlock", "방어 " .. tostring(self.PlayerBlock))`),
|
self:SetText("/ui/DefaultGroup/CombatHud/PlayerBlock", "방어 " .. string.format("%d", self.PlayerBlock))`),
|
||||||
]);
|
]);
|
||||||
for (const m of combat.ContentProto.Json.Methods) {
|
for (const m of combat.ContentProto.Json.Methods) {
|
||||||
m.ExecSpace = 6;
|
m.ExecSpace = 6;
|
||||||
|
|||||||
@@ -6884,11 +6884,11 @@
|
|||||||
"MobileOnly": false,
|
"MobileOnly": false,
|
||||||
"OffsetMax": {
|
"OffsetMax": {
|
||||||
"x": 180,
|
"x": 180,
|
||||||
"y": 80
|
"y": 380
|
||||||
},
|
},
|
||||||
"OffsetMin": {
|
"OffsetMin": {
|
||||||
"x": -180,
|
"x": -180,
|
||||||
"y": 36
|
"y": 336
|
||||||
},
|
},
|
||||||
"Pivot": {
|
"Pivot": {
|
||||||
"x": 0.5,
|
"x": 0.5,
|
||||||
@@ -6907,11 +6907,11 @@
|
|||||||
"UIVersion": 2,
|
"UIVersion": 2,
|
||||||
"anchoredPosition": {
|
"anchoredPosition": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 58
|
"y": 358
|
||||||
},
|
},
|
||||||
"Position": {
|
"Position": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 58,
|
"y": 358,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"QuaternionRotation": {
|
"QuaternionRotation": {
|
||||||
@@ -7072,11 +7072,11 @@
|
|||||||
"MobileOnly": false,
|
"MobileOnly": false,
|
||||||
"OffsetMax": {
|
"OffsetMax": {
|
||||||
"x": 180,
|
"x": 180,
|
||||||
"y": 36
|
"y": 336
|
||||||
},
|
},
|
||||||
"OffsetMin": {
|
"OffsetMin": {
|
||||||
"x": -180,
|
"x": -180,
|
||||||
"y": -4
|
"y": 296
|
||||||
},
|
},
|
||||||
"Pivot": {
|
"Pivot": {
|
||||||
"x": 0.5,
|
"x": 0.5,
|
||||||
@@ -7095,11 +7095,11 @@
|
|||||||
"UIVersion": 2,
|
"UIVersion": 2,
|
||||||
"anchoredPosition": {
|
"anchoredPosition": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 16
|
"y": 316
|
||||||
},
|
},
|
||||||
"Position": {
|
"Position": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 16,
|
"y": 316,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"QuaternionRotation": {
|
"QuaternionRotation": {
|
||||||
@@ -7260,11 +7260,11 @@
|
|||||||
"MobileOnly": false,
|
"MobileOnly": false,
|
||||||
"OffsetMax": {
|
"OffsetMax": {
|
||||||
"x": 180,
|
"x": 180,
|
||||||
"y": -2
|
"y": 298
|
||||||
},
|
},
|
||||||
"OffsetMin": {
|
"OffsetMin": {
|
||||||
"x": -180,
|
"x": -180,
|
||||||
"y": -38
|
"y": 262
|
||||||
},
|
},
|
||||||
"Pivot": {
|
"Pivot": {
|
||||||
"x": 0.5,
|
"x": 0.5,
|
||||||
@@ -7283,11 +7283,11 @@
|
|||||||
"UIVersion": 2,
|
"UIVersion": 2,
|
||||||
"anchoredPosition": {
|
"anchoredPosition": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -20
|
"y": 280
|
||||||
},
|
},
|
||||||
"Position": {
|
"Position": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -20,
|
"y": 280,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"QuaternionRotation": {
|
"QuaternionRotation": {
|
||||||
@@ -7448,11 +7448,11 @@
|
|||||||
"MobileOnly": false,
|
"MobileOnly": false,
|
||||||
"OffsetMax": {
|
"OffsetMax": {
|
||||||
"x": 180,
|
"x": 180,
|
||||||
"y": -37
|
"y": 263
|
||||||
},
|
},
|
||||||
"OffsetMin": {
|
"OffsetMin": {
|
||||||
"x": -180,
|
"x": -180,
|
||||||
"y": -75
|
"y": 225
|
||||||
},
|
},
|
||||||
"Pivot": {
|
"Pivot": {
|
||||||
"x": 0.5,
|
"x": 0.5,
|
||||||
@@ -7471,11 +7471,11 @@
|
|||||||
"UIVersion": 2,
|
"UIVersion": 2,
|
||||||
"anchoredPosition": {
|
"anchoredPosition": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -56
|
"y": 244
|
||||||
},
|
},
|
||||||
"Position": {
|
"Position": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -56,
|
"y": 244,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"QuaternionRotation": {
|
"QuaternionRotation": {
|
||||||
|
|||||||
Reference in New Issue
Block a user