55 lines
1.6 KiB
C#
55 lines
1.6 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ZiJinCopyOtherPlayerHeadInfoControl : MonoBehaviour {
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
|
|
}
|
|
public List<GameObject> _AllPlayerHeadInfoList = new List<GameObject>();
|
|
List<GameObject> _ShowPlayerHeadInfoList = new List<GameObject>();
|
|
public GameObject newName;
|
|
// Update is called once per frame
|
|
void Update () {
|
|
//在紫禁之巅中无效
|
|
|
|
for (int i = 0; i < _AllPlayerHeadInfoList.Count; i++)
|
|
{
|
|
|
|
if (GameManager.gameManager.m_RunningScene == 658)
|
|
{
|
|
if (_AllPlayerHeadInfoList[i].activeInHierarchy == true)
|
|
{
|
|
_ShowPlayerHeadInfoList.Add(_AllPlayerHeadInfoList[i]);
|
|
for (int j = 0; j < _ShowPlayerHeadInfoList.Count; j++)
|
|
{
|
|
_ShowPlayerHeadInfoList[j].SetActive(false);
|
|
}
|
|
}
|
|
|
|
if (newName.activeInHierarchy == false)
|
|
{
|
|
newName.SetActive(true);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
//for (int j = 0; j < _ShowPlayerHeadInfoList.Count; j++)
|
|
//{
|
|
// if (_ShowPlayerHeadInfoList[j].activeInHierarchy == false)
|
|
// {
|
|
// _ShowPlayerHeadInfoList[j].SetActive(true);
|
|
// }
|
|
//}
|
|
|
|
if (newName.activeInHierarchy == true)
|
|
{
|
|
newName.SetActive(false);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|