备份CatanBuilding瘦身独立工程

This commit is contained in:
JSD\13999
2026-05-26 16:15:54 +08:00
commit 2d0e6a61b7
12001 changed files with 2431925 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
public class ChallengeMatchSceneUIRegion : MonoBehaviour
{
public List<Transform> posTran;
public List<RectTransform> posTranRect;
public Transform myself;
public RectTransform myselfRect;
public string myJumpAudioName;
public string followerJumpAudioName;
public string fallAudioName;
private void Reset()
{
Init();
}
//private void Awake()
//{
//}
void Init()
{
myself = transform.Find("myself");
var re = transform.Find("myself (1)");
if (re)
{
myselfRect = re.GetComponent<RectTransform>();
}
int count = transform.childCount;
Transform pos;
Transform posRect;
for (int i = 1; i < count; i++)
{
pos = transform.Find(i.ToString());
posRect = transform.Find(i.ToString() + " (1)");
if (posRect != null)
{
posTranRect.Add(posRect.GetComponent<RectTransform>());
}
if (pos != null)
{
posTran.Add(pos);
}
else
{
break;
}
}
}
}