NewN_UAVPlane/Assets/Zion/Scripts/Adam/Components/PostureController.cs

38 lines
927 B
C#

using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class PostureController : MonoBehaviour
{
public List<EquipmentCommon> redObjs = new List<EquipmentCommon>();
public List<EquipmentCommon> blueObjs = new List<EquipmentCommon>();
public DeviceManager deviceManager;
public Transform redContanier;
public Transform blueContanier;
// Start is called before the first frame update
void Awake()
{
deviceManager = DeviceManager.Instance;
}
// Update is called once per frame
void Update()
{
}
private void OnEnable()
{
GetSceneInfo();
}
private void GetSceneInfo()
{
redObjs = deviceManager.devices.Where(x => x != null && x.gameObject.layer == 11).ToList();
blueObjs = deviceManager.devices.Where(x => x != null && x.gameObject.layer == 12).ToList();
}
}