ShanxiKnowledgeBase/SXElectricalInspection/Assets/GuYuan/WorkingPersonnel/WorkingPersonnel.cs

36 lines
981 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WorkingPersonnel : MonoBehaviour
{
public static WorkingPersonnel instance;
[SerializeField] string isWorkingPersonnel;
[SerializeField] GameObject game;
[SerializeField] GameObject g1;
public Dictionary<string,bool> keyValuePairs= new Dictionary<string,bool>();
private void Awake()
{
if (instance != null)
{
Destroy(gameObject);
return;
}
instance = this;
}
// Start is called before the first frame update
public void init()
{
Debug.Log("¿ªÊ¼±ãÀû");
foreach (var item in keyValuePairs)
{
Debug.Log(item.Key+" "+item.Value);
if (item.Key.Equals(GameManager.Instance.SceneName))
{
GameManager.Instance.GanTan?.SetActive(item.Value);
g1?.SetActive(item.Value);
}
}
}
}