替换玩家模型素材,添加 ChildrenMap 配置挂点

This commit is contained in:
2026-10-04 17:57:16 +08:00
parent 75ec52f3d4
commit aaa8cf3ee2
98 changed files with 6483 additions and 274 deletions
@@ -27,6 +27,7 @@ namespace SepCore.UI
View.infoText.text = _context.Description;
View.textFormatText.Set(_context.Price);
View.recycleButton.gameObject.SetActive(_context.ShowRecycleButton);
View.combineButton.gameObject.SetActive(_context.ShowCombineButton);
View.iconArea.SetRarity(_context.Rarity);
ResizeToFitContent();
@@ -54,6 +55,14 @@ namespace SepCore.UI
}
}
public void OnCombineButtonClick()
{
if (_context != null)
{
GameEntry.Event.Fire(this, ItemTooltipCombineEventArgs.Create(_context.Index));
}
}
public void OnCancelButtonClick()
{
GameEntry.Event.Fire(this, ItemTooltipHideEventArgs.Create());
@@ -68,6 +77,7 @@ namespace SepCore.UI
_listenersBound = true;
View.recycleButton.onClick.AddListener(OnRecycleButtonClick);
View.combineButton.onClick.AddListener(OnCombineButtonClick);
View.cancelButton.onClick.AddListener(OnCancelButtonClick);
}
@@ -83,7 +93,12 @@ namespace SepCore.UI
descriptionSize.y = View.infoText.preferredHeight;
View.infoText.rectTransform.sizeDelta = descriptionSize;
float descriptionHeight = Mathf.Max(0f, View.infoText.preferredHeight);
float targetHeight = _fixedTopHeight + descriptionHeight + _fixedBottomHeight;
float bottomHeight = _fixedBottomHeight;
if (_context != null && _context.ShowCombineButton)
{
bottomHeight += 100f;
}
float targetHeight = _fixedTopHeight + descriptionHeight + bottomHeight;
Vector2 size = new Vector2(_fixedWidth, targetHeight);
View.contentRectTransform.sizeDelta = size;