feat(scripts): SpiritType 4/5 逆向 (cc.EditBox / cc.Sprite SLICED) + SizeCalcMode 公式 (Task 5)
gameabc.min.js 逆向结果固化到 fixtures/spirit-semantics.json:
SpiritType 4 = cc.EditBox
逆向证据: phoneInfo Layer00029.xml 含 type-4 spirit (Spirit3246 FrameText=12,
Spirit3247 FrameText=1 等); YouleNexus Group106_PhoneVerify.prefab (映射到
Layer00029) 含 cc.EditBox 节点, 与 type-4 FrameText 输入框语义一致.
独有属性: FrameText (默认/显示文本) + ImgResID (背景图) + CanClick=1.
SpiritType 5 = cc.Sprite (type=SLICED)
逆向证据 1 (smoking gun): Layer00002.xml Spirit159 (370x170, 边缘 100/80/100/80)
→ YouleNexus Login_Layer.prefab 唯一 cc.Sprite._type=1 (SLICED), _contentSize
严格等于 370x170. 1:1 同一个节点.
逆向证据 2: Layer00609.xml '设置背景' (100/134/100/135) → YouleNexus
Layer609_Setting.prefab cc.Sprite._type=1.
独有属性: LeftEdge/TopEdge/RightEdge/BottomEdge (4 边缘宽度) = 9-slice scaling.
SizeCalcMode 0/2 公式 (55 Layer 全量解析: 仅观察到这两种值):
0 = 直接读 Width/Height (Task 3 已实现).
2 = parent_size (lookup by SizeParentID) * SizeRelaWidth/Height / 10000. 全部采样
WidthCalcMode=1, SizeRelaWidth=10000 (即按 100% 比例继承父 spirit 尺寸).
测试 spirit-type-reverse.test.mjs 3 个 case 全 PASS:
- SpiritType 4 component != unknown
- SpiritType 5 component != unknown
- spirit_types 含 5 项且全部 component != unknown