Compare commits

...

2 Commits

Author SHA1 Message Date
YangHua e0d6387ddc 融合 2024-01-25 15:17:02 +08:00
YangHua f1fb6b8fbb q 2024-01-25 15:16:30 +08:00
2 changed files with 12 additions and 5 deletions

View File

@ -32,8 +32,8 @@ Material:
- _dispStrength: 1 - _dispStrength: 1
- _overBright: 1 - _overBright: 1
m_Colors: m_Colors:
- _AmbientTint: {r: 1, g: 1, b: 1, a: 1} - _AmbientTint: {r: 0, g: 0, b: 0, a: 1}
- _Color: {r: 0.5, g: 0.49803922, b: 0.49215686, a: 0.2} - _Color: {r: 0.25, g: 0.25, b: 0.25, a: 0.040000003}
- _GlowColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} - _GlowColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
- _PrimaryTint: {r: 1, g: 1, b: 1, a: 1} - _PrimaryTint: {r: 1, g: 1, b: 1, a: 1}
- _TintColor: {r: 1, g: 1, b: 1, a: 1} - _TintColor: {r: 1, g: 1, b: 1, a: 1}

View File

@ -1,15 +1,20 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using UnityEngine; using UnityEngine;
public class PostureController : MonoBehaviour public class PostureController : MonoBehaviour
{ {
public List<EquipmentCommon> redObjs = new List<EquipmentCommon>(); public List<EquipmentCommon> redObjs = new List<EquipmentCommon>();
public List<EquipmentCommon> blueObjs = 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 // Start is called before the first frame update
void Start() void Awake()
{ {
deviceManager = DeviceManager.Instance;
} }
// Update is called once per frame // Update is called once per frame
@ -20,11 +25,13 @@ public class PostureController : MonoBehaviour
private void OnEnable() private void OnEnable()
{ {
GetSceneInfo();
} }
private void 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();
} }
} }