x1212
This commit is contained in:
parent
f2b7476009
commit
978b70d201
|
@ -3,12 +3,12 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class DeviceManager : MonoBehaviour
|
public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所有设备
|
/// 所有设备
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static List<EquipmentCommon> devices = new List<EquipmentCommon>();
|
public List<EquipmentCommon> devices = new List<EquipmentCommon>();
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,6 +93,7 @@ public class GameManager : MonoBehaviour
|
||||||
tenkokuModule.mainCamera = spt.transform;
|
tenkokuModule.mainCamera = spt.transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
SetWeatherValue();
|
SetWeatherValue();
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
equipmentCommon = GetComponent<EquipmentCommon>();
|
equipmentCommon = GetComponent<EquipmentCommon>();
|
||||||
DeviceManager.devices.Add(this);
|
DeviceManager.Instance.devices.Add(this);
|
||||||
// 订阅布尔值变化事件
|
// 订阅布尔值变化事件
|
||||||
OnActivationChanged += OnActivationChangedHandler;
|
OnActivationChanged += OnActivationChangedHandler;
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue