diff --git a/Assets/Resources/UI/HeroIcon/hero_icon.csv b/Assets/Resources/UI/HeroIcon/hero_icon.csv index 085d3b9a..bb11fafa 100644 --- a/Assets/Resources/UI/HeroIcon/hero_icon.csv +++ b/Assets/Resources/UI/HeroIcon/hero_icon.csv @@ -9,10 +9,10 @@ shard_badge_off,-6,조각: 배지가 칸 밖으로 나가는 양(왼쪽 · 위) oct_inset,10,완제품: 팔각 안쪽 얼굴 여백(hi_oct_fill 가 얼굴 마스크) oct_faction,40,완제품: 왼쪽 위 진영 배지 지름 oct_faction_off,-8,완제품: 진영 배지가 틀 밖으로 나가는 양 -oct_class,40,완제품: 오른쪽 위 병종 원 지름(PD 2026-11-26 「우측 상단에 병종 아이콘」 · 진영 배지와 같은 크기) -oct_class_off,-8,완제품: 병종 원이 틀 밖으로 나가는 양(오른쪽 · 위) -oct_class_icon,0.76,완제품: 병종 그림 크기 = 병종 원 지름 × 이 비율(크기와 무관한 비율 값) oct_star,26,완제품: 아래 별 한 개 크기 oct_star_gap,-4,완제품: 별 사이(음수 = 겹침) oct_band_h,32,완제품: 별 받침(짙은 둥근 띠 · 테마 chip · chip_dark) 높이 oct_band_y,20,완제품: 받침 위끝이 틀 아래끝에서 올라오는 양 +boss_slot,gear_purple_,보스 얼굴 칸 색 — 영웅이 아닌 적 보스만(영웅 보스 = 태생 ★ 색 · 값 = 보상 칸 색 묶음 이름 · grade_red_ 는 장식 층 색이 없어 흰 칸) +skill_slot_active,gear_purple_,보스 액티브 스킬 칸 색 +skill_slot_passive,gear_orange_,보스 패시브 스킬 칸 색 diff --git a/Assets/Resources/UI/HeroIcon/hero_icon_crop.csv b/Assets/Resources/UI/HeroIcon/hero_icon_crop.csv index 81adc588..35a86d5a 100644 --- a/Assets/Resources/UI/HeroIcon/hero_icon_crop.csv +++ b/Assets/Resources/UI/HeroIcon/hero_icon_crop.csv @@ -73,3 +73,41 @@ jinxuan,152.8,134.7,538.4,771,876, zhaofan,115.3,170.4,565.3,766,911, zhangren,162.1,174.8,539.7,789,932, chunyuqiong,228.4,130.9,403.2,895,977, +cc_boss_bianxi,218.6,69.5,722.8,979,977, +cc_boss_caiyang,230.7,151.3,382.6,897,976, +cc_boss_caohong,193.7,134.0,652.7,810,961, +cc_boss_chezhou,122.5,125.1,559.0,776,884, +cc_boss_chunyudao,300.2,165.1,527.5,987,902, +cc_boss_gaolan,315.3,140.4,501.5,1016,839, +cc_boss_hanfu,61.2,90.4,553.6,749,882, +cc_boss_kongxiu,182.1,140.5,667.8,795,976, +cc_boss_lidian,244.1,165.5,523.7,1015,870, +cc_boss_liudai,325.6,121.7,496.9,1017,822, +cc_boss_lvkuang,252.4,160.4,387.2,944,976, +cc_boss_lvxiang,221.6,166.7,376.7,875,976, +cc_boss_maojie,55.5,83.3,585.1,671,850, +cc_boss_mengtan,199.2,139.6,401.5,862,976, +cc_boss_qinqi,232.8,159.0,514.5,1015,863, +cc_boss_wangzhi,69.9,127.2,568.3,758,904, +cc_boss_wangzhong,163.1,123.6,525.8,754,856, +cc_boss_xiahoujie,242.2,169.4,395.6,922,977, +cc_boss_yanming,264.8,183.8,470.4,1015,864, +dz_boss_caoxing,126.5,208.8,590.9,820,975, +dz_boss_chengong,-13.4,96.3,662.8,718,961, +dz_boss_huzhen,252.2,161.3,367.5,912,977, +hgj_boss_chengyuanzhi,173.9,73.2,576.2,893,831, +hgj_boss_dengmao,277.2,88.3,613.6,1016,884, +hgj_boss_guanhai,197.2,45.9,605.6,1015,910, +hgj_boss_peiyuanshao,164.0,71.4,564.1,815,804, +hgj_boss_zhangbao,13.0,104.7,653.9,771,911, +hgj_boss_zhangliang,131.8,49.8,672.4,954,976, +jz_boss_caimao,118.7,127.0,550.6,735,894, +jz_boss_caixun,133.3,153.9,601.4,784,935, +jz_boss_caizhong,101.3,117.4,585.5,856,976, +jz_boss_chensun,258.1,119.6,467.9,1015,793, +jz_boss_wenpin,248.1,142.8,491.8,1015,871, +jz_boss_zhangwu,222.1,139.8,355.7,887,975, +jz_boss_zhangyun,139.1,141.4,585.9,909,976, +ys_boss_quyi,195.8,150.8,536.3,851,913, +ysu_boss_jiling,244.5,156.6,467.0,1016,845, +ysu_boss_xunzheng,330.0,131.2,488.0,1017,827, diff --git a/Assets/Resources/UI/Popup.meta b/Assets/Resources/UI/Popup.meta new file mode 100644 index 00000000..20333c49 --- /dev/null +++ b/Assets/Resources/UI/Popup.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4e9e44834f803124481d6722f33e02cd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/Popup/stage_popup.csv b/Assets/Resources/UI/Popup/stage_popup.csv new file mode 100644 index 00000000..181449e4 --- /dev/null +++ b/Assets/Resources/UI/Popup/stage_popup.csv @@ -0,0 +1,33 @@ +# 스테이지 입장 정보 팝업 배치(PD 2026-11-26 「불필요한 텍스트 정보 제거 · 타이틀 위치 조정 · 보스 스테이지 = 보스 정보(스킬 아이콘 · 툴팁)」) · 값 = 본문 칸 px(폭 860) +key,value,note +w,860,본문 칸 폭 +pad,24,좌우 여백 +tile,138,보상 칸 크기(PD 「UI 크게」 132 → 138) +title_y,12,맨 위 줄(단계 칩 + 제목) 위치 +title_h,64,맨 위 줄 높이 +code_w,150,단계 칩 폭(1-10) +code_h,58,단계 칩 높이 +code_font,36,단계 칩 글자 +title_gap,22,칩과 제목 사이 +title_font,48,스테이지 제목 글자 +stamp_gap,18,제목 뒤 BOSS 도장 사이 +stamp_font,44,제목 줄 BOSS 도장 글자 +after_title,14,제목 줄 아래 여백 +desc_h,104,전장 설명 칸 높이 +desc_font,28,전장 설명 글자 +after_desc,10,설명 칸 아래 여백 +after_sub,60,소제목(적 구성 · 전리품) 아래 +boss_tile,126,보스 얼굴 · 스킬 칸 크기(120 → 126) +boss_gap,44,보스 얼굴과 첫 스킬 칸 사이(떼어 놓음 · 예시) +skill_gap,16,스킬 칸 사이(붙임) +boss_stamp_x,30,보스 얼굴 칸 BOSS 도장 가운데(칸 오른쪽 끝에서 왼쪽으로) +boss_stamp_y,8,보스 얼굴 칸 BOSS 도장 가운데(칸 위에서) +boss_stamp_font,26,보스 얼굴 칸 BOSS 도장 글자 +after_boss,18,보스 줄 아래 여백 +tip_gap,10,스킬 툴팁 = 보스 줄 아래 이만큼 +tip_h,104,스킬 툴팁 최소 높이(설명 줄 수에 맞춰 늘어남) +tip_font,26,스킬 툴팁 설명 글자 +type_mid,40,병종 줄 가운데(줄 위에서) +after_types,14,병종 줄 아래 여백 +after_rewards,30,보상 칸 아래 여백 +center_k,0.5,내용이 판보다 짧을 때 남는 높이 중 위에 두는 비율(0.5 = 세로 가운데) diff --git a/Assets/Resources/UI/Popup/stage_popup.csv.meta b/Assets/Resources/UI/Popup/stage_popup.csv.meta new file mode 100644 index 00000000..646244b9 --- /dev/null +++ b/Assets/Resources/UI/Popup/stage_popup.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5eea6eb4fd96270479a7634a410ed58d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/OutGame/UI/HeroIcons.cs b/Assets/Scripts/OutGame/UI/HeroIcons.cs index 0a16bcdc..968479cc 100644 --- a/Assets/Scripts/OutGame/UI/HeroIcons.cs +++ b/Assets/Scripts/OutGame/UI/HeroIcons.cs @@ -47,13 +47,6 @@ namespace TKS.OutGame return v * size / refSize; } - /// 표 값 그대로(비율 등 크기와 무관한 값 · 없으면 d). - static float R(string key, float d) - { - float v; - return float.TryParse(Cfg(key), NumberStyles.Float, CultureInfo.InvariantCulture, out v) ? v : d; - } - /// 얼굴 자리(그림 px · x · y · side · w · h) — 없으면 null(그림 위쪽 가운데로 대체). public static float[] CropOf(string art) { @@ -110,14 +103,20 @@ namespace TKS.OutGame /// 얼굴(box 를 꽉 채우는 머리 · 어깨 · box 에 RectMask2D 또는 Mask 가 있어야 밖이 잘림). public static Image Face(RectTransform box, HeroDb.Hero h, Vector2 boxSize) { - var sp = h != null ? UiKit.ArtSprite(h.art) : null; + return h != null ? FaceOfArt(box, h.art, boxSize) : null; + } + + /// 그림 폴더(art) 로 얼굴 — 영웅이 아닌 적 보스도(표 hero_icon_crop 에 보스 그림 포함). + public static Image FaceOfArt(RectTransform box, string art, Vector2 boxSize) + { + var sp = UiKit.ArtSprite(art); if (sp == null) return null; var rt = UiKit.Rect("Face", box, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(0f, 0f), Vector2.zero); rt.pivot = new Vector2(0f, 1f); var img = rt.gameObject.AddComponent(); img.sprite = sp; img.raycastTarget = false; - var c = CropOf(h.art); + var c = CropOf(art); float sw = sp.rect.width, sh = sp.rect.height; float x, y, side; if (c != null) @@ -162,6 +161,46 @@ namespace TKS.OutGame if (!string.IsNullOrEmpty(qty)) UiKit.QtyChip(cell, qty, size >= 120f ? 30 : 24); } + /// 칸 모양(item_bg 둥근 모서리)으로 자른 안쪽 상자 — 얼굴 · 스킬 그림이 칸 밖으로 나오지 않게(조각과 같은 방식). + static RectTransform ClipBox(RectTransform cell, float size) + { + float clip = V("shard_clip", size), inset = V("shard_inset", size); + var cm = UiKit.Fill("Clip", cell, clip, clip, clip, clip); + UiKit.Skin(cm, "item_bg", Color.white); + cm.gameObject.AddComponent().showMaskGraphic = false; + float d = inset - clip; + return UiKit.Fill("Box", cm, d, d, d, d); + } + + /// + /// ③ 스테이지 팝업 보스 얼굴(PD 2026-11-26 「보스 스테이지 = 보스 정보」) — 보상 칸(색 = 표 boss_slot · 기본 붉음) + 그림 폴더 art 의 얼굴 + 칸 테두리 · 직소 배지 · 수량 없음. + /// + public static void Boss(RectTransform cell, string art, float size, int star = 0) + { + // 칸 색 = 그 보스가 영웅이면 태생 ★ 색(조각 칸과 같음 · PD 예시 = 장각 파랑) · 아니면 표 boss_slot(QA U2 · grade_red_ 는 장식 층 색이 없어 흰 칸으로 보임) + string pre = star > 0 ? SlotPrefix(star) : Cfg("boss_slot"); + UiKit.ItemSlot(cell, pre.Length > 0 ? pre : "gear_purple_", true); + float inset = V("shard_inset", size); + FaceOfArt(ClipBox(cell, size), art, new Vector2(size - inset * 2f, size - inset * 2f)); + UiKit.Layer(cell, "Border2", "item_border", UiKit.Col("gear_border", UiKit.Line)); + } + + /// + /// ④ 스킬 칸(보스 스킬 · 누르면 툴팁은 호출 쪽) — 보상 칸(액티브 = 표 skill_slot_active · 패시브 = skill_slot_passive) + 스킬 그림(테마 skill_<id> · 영웅 정보 화면과 같은 그림) · + /// 그림이 없는 스킬 = 병종 기호(영웅 정보 화면과 같은 대체). + /// + public static void SkillTile(RectTransform cell, string skillId, bool active, UnitType type, float size) + { + string pre = Cfg(active ? "skill_slot_active" : "skill_slot_passive"); + UiKit.ItemSlot(cell, pre.Length > 0 ? pre : active ? "gear_purple_" : "gear_orange_", true); + string iconId = "skill_" + skillId; + bool has = UISkin.Theme != null && UISkin.Theme.IconEntryOf(iconId) != null; + var box = ClipBox(cell, size); + var ic = UiKit.Icon(box, has ? iconId : UiKit.TypeSymbolId(type), new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), Vector2.zero, has ? size - V("shard_inset", size) * 2f : size * 0.62f); + if (ic != null) ic.raycastTarget = false; + UiKit.Layer(cell, "Border2", "item_border", UiKit.Col("gear_border", UiKit.Line)); + } + /// /// ② 완제품 영웅(HB안) — 왼쪽 위 (x, y) 정사각 size · star = 보유 ★(없으면 태생 ★) · 팔각 금테 + ★색 바탕 + 얼굴 + 진영 + 별 받침. /// @@ -194,21 +233,6 @@ namespace TKS.OutGame // 왼쪽 위 진영 float fd = V("oct_faction", size), fo = V("oct_faction_off", size); if (h != null) UiKit.DropShadow(UiKit.FactionBadge(root, h.faction, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(fo, -fo), fd), 2f); - // 오른쪽 위 병종(PD 2026-11-26 「영웅 아이콘 우측 상단에 병종 아이콘도 추가」) — 진영 배지와 같은 원 틀(짙은 바탕) + 영웅 카드와 같은 병종 그림(TypeSymbolId) - float cd = V("oct_class", size), co = V("oct_class_off", size); - if (h != null) - { - var ring = UiKit.Skin(UiKit.Rect("Class", root, new Vector2(1f, 1f), new Vector2(1f, 1f), new Vector2(-co, -co), new Vector2(cd, cd)), "circle_frame", UiKit.Col("chip_dark", UiKit.Dark)); - ring.preserveAspect = true; - var inner = UiKit.Rect("In", ring.transform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), Vector2.zero, new Vector2(cd * 0.72f, cd * 0.72f)).gameObject.AddComponent(); - inner.sprite = UiKit.Circle; - inner.color = UiKit.Col("chip_dark", UiKit.Dark); - inner.raycastTarget = false; - var sym = UiKit.Icon(ring.transform, UiKit.TypeSymbolId(h.type), new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), Vector2.zero, cd * R("oct_class_icon", 0.76f)); - if (sym != null) sym.raycastTarget = false; - else UiKit.Title(UiKit.FillLabel(ring.transform, UnitTypeInfo.Mark(h.type), Mathf.RoundToInt(cd * 0.48f), UiKit.White), true); - UiKit.DropShadow(ring, 2f); - } // 아래 별 받침 float ss = V("oct_star", size), gap = V("oct_star_gap", size), bh = V("oct_band_h", size); float bw = star * ss + (star - 1) * gap + bh * 0.5f; diff --git a/Assets/Scripts/OutGame/UI/OutGameRoot.cs b/Assets/Scripts/OutGame/UI/OutGameRoot.cs index fa739587..798a6a61 100644 --- a/Assets/Scripts/OutGame/UI/OutGameRoot.cs +++ b/Assets/Scripts/OutGame/UI/OutGameRoot.cs @@ -1029,133 +1029,144 @@ namespace TKS.OutGame void PopupFill(int si, bool locked, RectTransform field) { + // 스테이지 입장 정보(PD 2026-11-26 「불필요한 텍스트 정보를 모두 제거 · 타이틀 위치 조정 · 보스 스테이지는 보스 정보(액티브 · 패시브 스킬 아이콘 · 터치 = 툴팁)」 · 예시 그림) + // 위 명패 = 장 이름만(WorldMapScreen) · 맨 위 줄 = 단계 칩(1-10) + 스테이지 제목 + BOSS 도장 · 전장 설명 · 적 구성(보스 = 얼굴 + 스킬 2) · 보상 칸(이름 · 안내 글 없음) · 별 조건 var s = Battle.Config.stages[si]; var db = Session.Db; var d = Session.Save; - var e = db.Economy; var row = db.Rewards.For(s.chapter); - const float W = 860f, Pad = 24f, Tile = 132f; - var soft = UiKit.Col("text_soft", UiKit.InkSoft); - var head = UiKit.Title(UiKit.Label(field, s.title, 38, UiKit.White, TextAnchor.MiddleCenter, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(Pad, -18f), new Vector2(W - Pad * 2f, 56f)), true); - head.horizontalOverflow = HorizontalWrapMode.Overflow; - if (!string.IsNullOrEmpty(s.place)) - UiKit.Label(field, s.place + (string.IsNullOrEmpty(s.bgTheme) ? "" : " · " + s.bgTheme), 26, soft, TextAnchor.MiddleCenter, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(Pad, -76f), new Vector2(W - Pad * 2f, 34f), false); + float W = PopupLayout("w", 860f), Pad = PopupLayout("pad", 24f), Tile = PopupLayout("tile", 132f); + bool boss = s.kind == StageKind.Boss; - // 전장 설명(2026-11-12 시나리오 이벤트 C1 · Resources/Scenario/stage_story.csv) — 장소 줄 아래 · 짙은 칸 + 금색 테두리 · 2줄 이내 · 잠긴 판·다시 출정에도 - float y = 124f; + // 맨 위 줄 = 단계 칩 + 제목 + (보스) BOSS 도장 + float y = PopupLayout("title_y", 12f), th = PopupLayout("title_h", 64f); + float cw = PopupLayout("code_w", 150f), ch = PopupLayout("code_h", 58f), tg = PopupLayout("title_gap", 22f); + // 스테이지 명칭 = 가운데 정렬(PD 2026-11-26) — 제목 글자가 본문 가운데 · 단계 칩은 바로 왼쪽 · BOSS 도장은 바로 오른쪽(칩이 여백 밖으로 나가면 묶음째 오른쪽으로) + var title = UiKit.Title(UiKit.Label(field, s.title, (int)PopupLayout("title_font", 46f), UiKit.White, TextAnchor.MiddleLeft, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(0f, -y), new Vector2(W, th)), true); + title.horizontalOverflow = HorizontalWrapMode.Overflow; + float tw = title.preferredWidth; + float tx = (W - tw) * 0.5f; + if (tx - tg - cw < Pad) tx = Pad + cw + tg; + title.rectTransform.anchoredPosition = new Vector2(tx, -y); + title.rectTransform.sizeDelta = new Vector2(tw + 4f, th); + UiKit.InfoChip(field, "Code", tx - tg - cw, y + (th - ch) * 0.5f, cw, ch, null, s.chapter + "-" + s.stage, (int)PopupLayout("code_font", 36f)); + if (boss) BossStamp(field, tx + tw + PopupLayout("stamp_gap", 18f), y + th * 0.5f, PopupLayout("stamp_font", 44f), "Stamp"); + y += th + PopupLayout("after_title", 14f); + + // 전장 설명(stage_story.csv · 짙은 칸 + 금 테두리) string desc = ScenarioData.Desc(s.chapter, s.stage); if (!string.IsNullOrEmpty(desc)) { - const float DescH = 84f; - var box = UiKit.Rect("Desc", field, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(Pad, -118f), new Vector2(W - Pad * 2f, DescH)); - var bg = UiKit.Skin(box, "panel12", UiKit.Col("row_on_field", UiKit.Dark)); // 별 조건 행과 같은 짙은 칸 + float DescH = PopupLayout("desc_h", 104f); + var box = UiKit.Rect("Desc", field, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(Pad, -y), new Vector2(W - Pad * 2f, DescH)); + var bg = UiKit.Skin(box, "panel12", UiKit.Col("row_on_field", UiKit.Dark)); bg.raycastTarget = false; var rim = box.gameObject.AddComponent(); rim.effectColor = UiKit.Col("gold", new Color(0.91f, 0.66f, 0.23f)); rim.effectDistance = new Vector2(2f, -2f); - var dt = UiKit.Label(box, desc, 26, UiKit.Col("text_cream", new Color(1f, 0.95f, 0.84f)), TextAnchor.MiddleCenter, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(18f, -4f), new Vector2(W - Pad * 2f - 36f, DescH - 8f), false); + var dt = UiKit.Label(box, desc, (int)PopupLayout("desc_font", 28f), UiKit.Col("text_cream", new Color(1f, 0.95f, 0.84f)), TextAnchor.MiddleCenter, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(18f, -4f), new Vector2(W - Pad * 2f - 36f, DescH - 8f), false); dt.horizontalOverflow = HorizontalWrapMode.Wrap; - y += DescH + 8f; + y += DescH + PopupLayout("after_desc", 10f); } - // 적 구성 = 병종 원(type 색 Circle78 68 + 병종 아이콘 40) + 「×n」 · 가운데 정렬 + // 적 구성 — 보스 판 = 보스 얼굴 + 액티브 · 패시브 스킬 칸(누르면 툴팁) · 그 아래 병종 원 + 「×n」 UiKit.SubTitle(field, "적 구성", Pad, y, W - Pad * 2f); - var counts = new int[UnitTypeInfo.Count]; - var lead = new List(); - foreach (var en in s.enemies) + y += PopupLayout("after_sub", 56f); + var bossE = boss ? s.enemies.Find(en => en.isBoss) : null; + if (bossE != null) { - counts[(int)en.type]++; - if (en.isBoss || en.isGeneral) lead.Add((en.isBoss ? "보스 " : "") + en.name); + string act, pas; + var bossHero = SkillSystem.EnemySkillIds(bossE, s.chapter, TacticalAI.BossUsesActive(s, bossE), true, out act, out pas); // 전투(AttachEnemy)와 같은 규칙 + float bt = PopupLayout("boss_tile", 120f), bgap = PopupLayout("boss_gap", 44f), sgap = PopupLayout("skill_gap", 16f); + var ids = new List(); + if (!string.IsNullOrEmpty(act)) ids.Add(act); + if (!string.IsNullOrEmpty(pas)) ids.Add(pas); + // 보스 얼굴은 떼어 놓고 스킬 칸끼리 붙임(예시 · QA M1) — 보스와 첫 스킬 사이 = boss_gap · 스킬 사이 = skill_gap + float rw = bt + (ids.Count > 0 ? bgap + ids.Count * bt + (ids.Count - 1) * sgap : 0f); + float bx = (W - rw) * 0.5f; + var face = UiKit.At(field, "Boss", bx, y, bt, bt); + HeroIcons.Boss(face, bossE.art, bt, bossHero != null ? bossHero.rarity : 0); + RectTransform tip = null; + float tipY = y + bt + PopupLayout("tip_gap", 10f); + for (int i = 0; i < ids.Count; i++) + { + string id = ids[i]; + bool isAct = id == act; + var cell = UiKit.At(field, "Skill" + i, bx + bt + bgap + i * (bt + sgap), y, bt, bt); + HeroIcons.SkillTile(cell, id, isAct, bossE.type, bt); + var hit = cell.gameObject.AddComponent(); + hit.color = Color.clear; + var btn = cell.gameObject.AddComponent