// ───────────────────────────────────────────────────────────────────────────── // WLEquipGui.PartSkill.cs — 장비 화면 #879 장비 파츠 스킬 확장 (기획 v2 18 · 19장 · PD 10-16 슬롯 배치) // // - 슬롯: 자리별 부위(hub.slotTypes) · 칸 아래 「부위 + 기본 능력치」 2줄 · 칸 모서리 스킬 뱃지(공격 빨강 · 방어 파랑 · 패시브 초록 · 무기 시너지 보라 · 시너지 금테) // - 무대 아래 「장착 스킬」 줄: 액티브 4(원) + 패시브 2(띠) + 시너지 도감 버튼 · 그 아래 시너지 알림 한 줄 // - 스킬 상세 팝업: 설명 · 등급별 개방 표(일반 Lv1 … 전설 Lv5 · 불멸 × 1.2 · 신화 × 1.5 · 지금 등급 강조) · 시너지 조건 · 룬 칸(이후) // - 시너지 도감: 시너지 · 결합 목록 · 찾은 것 ✓ · 못 찾은 것은 짝을 ??? 로 가림 // - 아이템 상세 팝업 맨 위에 스킬 · 시너지 문단 // 치수 = WLEquipGui.json partSkill · 색 = colors(skillAttack · skillDefense · skillPassive · skillWeapon · synergyOn …) · C45. // ───────────────────────────────────────────────────────────────────────────── using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; using WL.PartSkill; namespace WL.Equip { public partial class WLEquipGui { WLGuiPartSkill PS; sealed class PsBadge { public RectTransform root; public Image ring, bg, icon; public TextMeshProUGUI lv; public WLPartSlot slot; } sealed class PsChip { public RectTransform root; public Image ring, bg, icon; public TextMeshProUGUI lv, name; public WLPartSlot slot; public bool passive; } readonly PsBadge[] _psBadges = new PsBadge[6]; readonly List _psChips = new List(); RectTransform _psStrip; TextMeshProUGUI _psSyn; Button _psBookBtn; // 스킬 상세 GameObject _psDetail; Image _psdIcon, _psdRing; TextMeshProUGUI _psdTitle, _psdSub, _psdDesc, _psdSyn, _psdRune; readonly List _psdRowBg = new List(); readonly List _psdRowTier = new List(), _psdRowText = new List(); readonly List _psdRowTierBg = new List(); // 도감 GameObject _psBook; RectTransform _psBookContent; TextMeshProUGUI _psBookHead; readonly List _psBookRows = new List(); readonly List _psBookRowBg = new List(); readonly List _psBookKeys = new List(); public static int PartSkillDetailOpens, PartSkillBookOpens; bool PsOn { get { return PS != null && PS.enabled != 0 && WLPartSkillData.Enabled; } } /// 슬롯 자리 i(왼쪽 위 0 … 오른쪽 아래 5)의 부위. eFREquipmentType SlotType(int i) { var t = H != null ? H.slotTypes : null; return t != null && i < t.Length && t[i] > 0 ? (eFREquipmentType)t[i] : (eFREquipmentType)(i + 1); } Color AttrCol(string attr, bool synergy) { if (synergy) return Col("synergyOn", new Color(1f, 0.8f, 0.25f, 1f)); switch (attr) { case "attack": return Col("skillAttack", new Color(0.93f, 0.33f, 0.33f, 1f)); case "defense": return Col("skillDefense", new Color(0.27f, 0.56f, 0.96f, 1f)); case "passive": return Col("skillPassive", new Color(0.32f, 0.76f, 0.45f, 1f)); case "weapon": return Col("skillWeapon", new Color(0.62f, 0.43f, 0.9f, 1f)); } return Col("frameEmpty", Color.gray); } // ── 조립 ───────────────────────────────────────────────────────── void BuildPartSkillUi() { PS = _g.partSkill ?? new WLGuiPartSkill(); if (!PsOn) return; WLPartSkillState.EnsureHooked(); WLPartSkillState.SynergyFound -= OnPsSynergyFound; WLPartSkillState.SynergyFound += OnPsSynergyFound; var circle = WLPartSkillHud.CircleSprite(); // 슬롯 아래 라벨 2줄 + 스킬 뱃지 for (int i = 0; i < 6; i++) { var nm = _slotNames[i]; if (nm != null && nm.gameObject.activeSelf) { var rt = nm.rectTransform; rt.sizeDelta = new Vector2(H.slotSize + 70f, PS.slotLabelH); nm.fontSize = PS.slotLabelFontPx; nm.enableWordWrapping = false; nm.overflowMode = TextOverflowModes.Overflow; nm.lineSpacing = -8f; } var c = _slots[i]; if (c == null) continue; var b = new PsBadge(); b.root = NewRT(c.root, "SkillBadge"); Place(b.root, new Vector2(1f, 0f), new Vector2(-PS.badgeInset, PS.badgeInset), new Vector2(PS.badge, PS.badge), new Vector2(1f, 0f)); b.ring = NewImage(b.root, "Ring", circle, Color.white, Image.Type.Simple); Stretch(b.ring.rectTransform); b.ring.raycastTarget = true; b.bg = NewImage(b.root, "Bg", circle, Col("slotInner", new Color(0.12f, 0.1f, 0.15f, 1f)), Image.Type.Simple); Stretch(b.bg.rectTransform, 5f, 5f, 5f, 5f); b.icon = NewImage(b.root, "Icon", null, Color.white, Image.Type.Simple); b.icon.preserveAspect = true; Stretch(b.icon.rectTransform, 8f, 8f, 8f, 8f); b.lv = NewText(b.root, "Lv", PS.badgeLvFontPx, TextAlignmentOptions.Bottom, Color.white); b.lv.fontStyle = FontStyles.Bold; ApplyOutline(b.lv); var lrt = b.lv.rectTransform; lrt.anchorMin = new Vector2(0f, 0f); lrt.anchorMax = new Vector2(1f, 0f); lrt.pivot = new Vector2(0.5f, 1f); lrt.pivot = new Vector2(0.5f, 0.5f); lrt.anchoredPosition = new Vector2(0f, 4f); lrt.sizeDelta = new Vector2(20f, PS.badgeLvFontPx + 6f); var btn = b.ring.gameObject.AddComponent