cull(engine-cleanup): pass-8 phase-2 cascade round 2 after AreaSelectUI stub

This commit is contained in:
gamer147
2026-07-03 22:19:20 -04:00
parent ad525456be
commit b148eb2968
12 changed files with 0 additions and 505 deletions

View File

@@ -56,9 +56,6 @@ public class AreaSelInfo : MonoBehaviour
}
};
[SerializeField]
private GameObject _clearRewardPrefab;
private List<AreaSelectClearReward> _clearRewardList = new List<AreaSelectClearReward>();
[SerializeField]
@@ -78,206 +75,12 @@ public class AreaSelInfo : MonoBehaviour
private List<UIBase_CardManager.CardObjData> _cardObjList = new List<UIBase_CardManager.CardObjData>();
[SerializeField]
private GameObject CardDetailRoot;
[SerializeField]
private CardDetailUI CardDetailPrefab;
private CardDetailUI _cardDetail;
private List<string> _loadFileList = new List<string>();
private bool _isLoadEnd = true;
private void RepositionRewards()
{
for (int i = 0; i < _tableRewardsCategory.Length; i++)
{
_tableRewardsCategory[i].gameObject.SetActive(value: false);
}
for (int j = 0; j < _clearRewardList.Count; j++)
{
if (_clearRewardList[j].gameObject.activeSelf)
{
int num = _clearRewardList[j].RewardGoodsType switch
{
UserGoods.Type.Card => 0,
UserGoods.Type.Sleeve => 1,
_ => 2,
};
Transform obj = _clearRewardList[j].gameObject.transform;
obj.SetParent(_tableRewardsCategory[num].transform);
obj.SetAsLastSibling();
_tableRewardsCategory[num].gameObject.SetActive(value: true);
}
}
for (int k = 0; k < _tableRewardsCategory.Length; k++)
{
if (_tableRewardsCategory[k].gameObject.activeInHierarchy)
{
_tableRewardsCategory[k].Reposition();
}
}
_tableRoot.Reposition();
if (_tableRewardsCategory[0].gameObject.activeInHierarchy)
{
_tableRoot.transform.localPosition = REWARD_TABLE_CARD_POSITION;
for (int l = 0; l < _tableRewardsCategory.Length; l++)
{
if (l != 0)
{
Vector3 localPosition = _tableRewardsCategory[l].transform.localPosition;
localPosition.x += -16f;
_tableRewardsCategory[l].transform.localPosition = localPosition;
}
}
}
else
{
_tableRoot.transform.localPosition = REWARD_TABLE_DEFAULT_POSITION;
}
}
private void SetRewardBackgroundWidth()
{
float num = 0f;
for (int i = 0; i < _clearRewardList.Count; i++)
{
if (_clearRewardList[i].gameObject.activeInHierarchy)
{
UserGoods.Type rewardGoodsType = _clearRewardList[i].RewardGoodsType;
num += REWARD_BG_OFFSET_MAGNIFICATION[rewardGoodsType];
}
}
int width = 250 + (int)(90f * num);
_spriteRewardBackground.width = width;
}
private void SetAcquiredLabel(bool isAcquired)
{
_labelAcquired.gameObject.SetActive(isAcquired);
if (!isAcquired)
{
return;
}
float a = float.MaxValue;
float num = float.MinValue;
bool flag = true;
for (int i = 0; i < _clearRewardList.Count; i++)
{
if (_clearRewardList[i].gameObject.activeInHierarchy)
{
Transform rewardTransform = _clearRewardList[i].GetRewardTransform();
a = Mathf.Min(a, rewardTransform.position.x);
num = Mathf.Max(num, rewardTransform.position.x);
if (_clearRewardList[i].RewardGoodsType != UserGoods.Type.Degree)
{
flag = false;
}
}
}
Vector3 position = _labelAcquired.transform.position;
position.x = Mathf.Lerp(a, num, 0.5f);
_labelAcquired.transform.position = position;
Vector3 localPosition = _labelAcquired.transform.localPosition;
localPosition.y = _tableRoot.transform.localPosition.y + (flag ? (-10f) : 0f);
_labelAcquired.transform.localPosition = localPosition;
}
private IEnumerator LoadClearPresentInner(List<int> cardidlist, List<string> rewardPathList)
{
UIManager uiMgr = UIManager.GetInstance();
UIBase_CardManager uiCardMgr = uiMgr.getUIBase_CardManager();
bool isLoadRewardEnd = false;
_loadFileList.Clear();
bool isLoadCard = cardidlist.Count > 0;
if (isLoadCard)
{
int layer = LayerMask.NameToLayer("FrontUI");
uiMgr.CardLoadSelect(base.gameObject, cardidlist, layer, is2D: true);
}
StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(rewardPathList, delegate
{
_loadFileList.AddRange(rewardPathList);
isLoadRewardEnd = true;
}));
while ((isLoadCard && (!uiCardMgr.getCreateEndFlag() || !uiCardMgr.isAssetAllReady)) || !isLoadRewardEnd)
{
yield return null;
}
_cardObjList = uiMgr.getCardList2DObjs();
if (_cardObjList != null)
{
for (int num = 0; num < _cardObjList.Count; num++)
{
GameObject cardObj = _cardObjList[num].CardObj;
if (!(cardObj == null))
{
cardObj.SetActive(value: false);
UITexture[] componentsInChildren = cardObj.GetComponentsInChildren<UITexture>(includeInactive: true);
for (int num2 = 0; num2 < componentsInChildren.Length; num2++)
{
componentsInChildren[num2].depth += 50;
}
UILabel[] componentsInChildren2 = cardObj.GetComponentsInChildren<UILabel>(includeInactive: true);
for (int num3 = 0; num3 < componentsInChildren2.Length; num3++)
{
componentsInChildren2[num3].depth += 50;
}
UISprite[] componentsInChildren3 = cardObj.GetComponentsInChildren<UISprite>(includeInactive: true);
for (int num4 = 0; num4 < componentsInChildren3.Length; num4++)
{
componentsInChildren3[num4].depth += 50;
}
cardObj.GetComponent<CardListTemplate>().HideNum();
cardObj.AddComponent<BoxCollider>().size = CLEARPRESENT_CARD_COLLISIONSIZE;
cardObj.AddComponent<UIEventListener>().onClick = _cardDetail.OnPushCardDetailOn;
}
}
}
for (int num5 = 0; num5 < 3; num5++)
{
_clearRewardList[num5].Init(_cardObjList, _cardObjEvacuationRoot);
}
_isLoadEnd = true;
}
public void ReleaseClearPresent()
{
if (_cardDetail != null)
{
Object.Destroy(_cardDetail.gameObject);
_cardDetail = null;
}
if (_cardObjList != null)
{
for (int i = 0; i < _cardObjList.Count; i++)
{
Object.Destroy(_cardObjList[i].CardObj.gameObject);
}
_cardObjList.Clear();
}
Toolbox.ResourcesManager.RemoveAssetGroup(_loadFileList);
_loadFileList.Clear();
}
private void OnCardDetailClose()
{
}
public void MoveToScreenObj(GameObject target, float localPosX, float time)
{
if (Mathf.Approximately(time, 0f))
{
Vector3 localPosition = target.transform.localPosition;
localPosition.x = localPosX;
target.transform.localPosition = localPosition;
return;
}
iTween.MoveTo(target, iTween.Hash("islocal", true, "x", localPosX, "time", time));
}
public static string GetPresentItemName(int itemID, long userGoodsId)
{
switch ((UserGoods.Type)itemID)