From a5f3bf1829859eb3f5ec00fd4d3429b5464cebd2 Mon Sep 17 00:00:00 2001 From: gahusb Date: Sat, 6 Jun 2026 08:19:36 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B9=B4=EB=93=9C=20=EC=86=90=ED=8C=A8=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EA=B8=B0:=20image=20=ED=95=84=EB=93=9C=20?= =?UTF-8?q?=EC=A7=80=EC=9B=90=20(5=EB=B2=88=20=EC=B9=B4=EB=93=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=A0=81=EC=9A=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- tools/gen-cardhand.mjs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/gen-cardhand.mjs b/tools/gen-cardhand.mjs index 7bd721a..812dfce 100644 --- a/tools/gen-cardhand.mjs +++ b/tools/gen-cardhand.mjs @@ -10,7 +10,7 @@ const cards = [ { name: '타격', cost: '1', desc: '피해 6', tint: ATTACK }, { name: '방어', cost: '1', desc: '방어도 5', tint: DEFEND }, { name: '방어', cost: '1', desc: '방어도 5', tint: DEFEND }, - { name: '강타', cost: '2', desc: '피해 10', tint: ATTACK }, + { name: '강타', cost: '2', desc: '피해 10', tint: ATTACK, image: '734473d91cc6440491335c204a4de087' }, ]; const CARD_W = 180, CARD_H = 250, CARD_SPACING = 200; // AlignmentType enum: Center=0, TopLeft=4, BottomCenter=6 (MSW가 이 값으로 앵커를 결정) @@ -167,7 +167,11 @@ ents.push(entity({ cards.forEach((c, i) => { const cardPath = `/ui/DefaultGroup/CardHand/Card${i + 1}`; - // card background + const cardH = c.image ? 270 : CARD_H; + const cardSprite = c.image + ? sprite({ dataId: c.image, color: { r: 1.0, g: 1.0, b: 1.0, a: 1.0 }, type: 0, raycast: true }) + : sprite({ color: c.tint, type: 1, raycast: true }); + // card background (or full image) ents.push(entity({ id: guid(g++), path: cardPath, @@ -176,10 +180,12 @@ cards.forEach((c, i) => { componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent', displayOrder: i, components: [ - transform({ parentW: 1020, parentH: 280, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: CARD_W, y: CARD_H }, pos: { x: (i - (cards.length - 1) / 2) * CARD_SPACING, y: 0 }, align: ALIGN_CENTER }), - sprite({ color: c.tint, type: 1, raycast: true }), + transform({ parentW: 1020, parentH: 280, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: CARD_W, y: cardH }, pos: { x: (i - (cards.length - 1) / 2) * CARD_SPACING, y: 0 }, align: ALIGN_CENTER }), + cardSprite, ], })); + // 이미지 카드는 텍스트 오버레이를 만들지 않는다 (이미지에 이미 포함) + if (c.image) return; // cost (top-left) ents.push(entity({ id: guid(g++),