설비 KPI 오류 수정 및 애니메이션 속도 조정, 라이브러리 강조 효과 변경 및 UI 수정
This commit is contained in:
@@ -119,8 +119,8 @@ Material:
|
|||||||
- _WorkflowMode: 1
|
- _WorkflowMode: 1
|
||||||
- _ZWrite: 0
|
- _ZWrite: 0
|
||||||
m_Colors:
|
m_Colors:
|
||||||
- _BaseColor: {r: 0, g: 0, b: 1, a: 0.000000014901161}
|
- _BaseColor: {r: 0, g: 0, b: 1, a: 0.049999952}
|
||||||
- _Color: {r: 0, g: 0, b: 1, a: 0.5}
|
- _Color: {r: 0, g: 0, b: 1, a: 0.000000029802322}
|
||||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,7 @@ namespace CHN
|
|||||||
public UI_MachineKPI machineKPI;
|
public UI_MachineKPI machineKPI;
|
||||||
public Sprite previewImage;
|
public Sprite previewImage;
|
||||||
public Vector3 centerPos;
|
public Vector3 centerPos;
|
||||||
|
public Animator animator;
|
||||||
|
|
||||||
Renderer[] renderers;
|
Renderer[] renderers;
|
||||||
public List<Material> HoverMaterials = new List<Material>();
|
public List<Material> HoverMaterials = new List<Material>();
|
||||||
@@ -24,6 +25,7 @@ namespace CHN
|
|||||||
public Material translucentMat;
|
public Material translucentMat;
|
||||||
Material hoverRedMat;
|
Material hoverRedMat;
|
||||||
public int flashCount;
|
public int flashCount;
|
||||||
|
public float animSpeed;
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
@@ -31,6 +33,8 @@ namespace CHN
|
|||||||
return;
|
return;
|
||||||
GetComponentInParent<Floor>().machines.Add(this);
|
GetComponentInParent<Floor>().machines.Add(this);
|
||||||
centerPos = transform.GetMeshGroupCenter();
|
centerPos = transform.GetMeshGroupCenter();
|
||||||
|
animator = GetComponentInChildren<Animator>();
|
||||||
|
|
||||||
renderers = GetComponentsInChildren<Renderer>();
|
renderers = GetComponentsInChildren<Renderer>();
|
||||||
|
|
||||||
translucentMat = Resources.Load<Material>("MAT_Translucent");
|
translucentMat = Resources.Load<Material>("MAT_Translucent");
|
||||||
@@ -38,6 +42,17 @@ namespace CHN
|
|||||||
CachingOriginMat();
|
CachingOriginMat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetAnimationSpeed()
|
||||||
|
{
|
||||||
|
if (machineKPI != null)
|
||||||
|
{
|
||||||
|
float.TryParse(machineKPI.data.eorate, out var eorate);
|
||||||
|
|
||||||
|
animSpeed = eorate / 100f;
|
||||||
|
animator.speed = animSpeed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CachingOriginMat()
|
void CachingOriginMat()
|
||||||
{
|
{
|
||||||
foreach (Renderer renderer in renderers)
|
foreach (Renderer renderer in renderers)
|
||||||
@@ -159,21 +174,10 @@ namespace CHN
|
|||||||
}
|
}
|
||||||
IEnumerator OneFlash()
|
IEnumerator OneFlash()
|
||||||
{
|
{
|
||||||
float alpha = 0f;
|
float alpha = 0.8f;
|
||||||
float coeff = 0.2f;
|
float coeff = 0.15f;
|
||||||
if (flashCount == 0)
|
if (flashCount == 0)
|
||||||
{
|
{
|
||||||
while (alpha < 0.7f)
|
|
||||||
{
|
|
||||||
yield return new WaitForSeconds(0.05f);
|
|
||||||
|
|
||||||
foreach (var m in HoverMaterials)
|
|
||||||
{
|
|
||||||
m.color = new Color(m.color.r, m.color.g, m.color.b, alpha);
|
|
||||||
}
|
|
||||||
alpha += coeff;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (alpha > 0f)
|
while (alpha > 0f)
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(0.05f);
|
yield return new WaitForSeconds(0.05f);
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ namespace CHN
|
|||||||
var machinePos = machine.centerPos;
|
var machinePos = machine.centerPos;
|
||||||
machine.machineKPI.transform.position = new Vector3(machinePos.x, machinePos.y + defaultNameHeight, machinePos.z);
|
machine.machineKPI.transform.position = new Vector3(machinePos.x, machinePos.y + defaultNameHeight, machinePos.z);
|
||||||
matchingMachines.Add(machine);
|
matchingMachines.Add(machine);
|
||||||
|
machine.SetAnimationSpeed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -114,7 +115,7 @@ namespace CHN
|
|||||||
}
|
}
|
||||||
void RangeDetection()
|
void RangeDetection()
|
||||||
{
|
{
|
||||||
var layerMask = LayerMask.GetMask("Camera", "Floor Wall", "Floor Ground");
|
var layerMask = LayerMask.GetMask("Camera", "Floor Wall");
|
||||||
var currentFloor = FindSingle<Building>().currentFloor;
|
var currentFloor = FindSingle<Building>().currentFloor;
|
||||||
|
|
||||||
var max = cam.option.maxDistance - cam.option.minDistance;
|
var max = cam.option.maxDistance - cam.option.minDistance;
|
||||||
@@ -127,12 +128,10 @@ namespace CHN
|
|||||||
{
|
{
|
||||||
if (machine.GetComponentInParent<Floor>() != currentFloor)
|
if (machine.GetComponentInParent<Floor>() != currentFloor)
|
||||||
{
|
{
|
||||||
machine.machineKPI.SetActive(false);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineKPIsActive(machine, layerMask);
|
MachineKPIsActive(machine, layerMask);
|
||||||
|
|
||||||
var machineKPI = machine.machineKPI;
|
var machineKPI = machine.machineKPI;
|
||||||
machineKPI.transform.localScale = originScale * distanceScale;
|
machineKPI.transform.localScale = originScale * distanceScale;
|
||||||
}
|
}
|
||||||
@@ -149,7 +148,7 @@ namespace CHN
|
|||||||
}
|
}
|
||||||
void MachineKPIsActive(Machine machine, LayerMask layerMask)
|
void MachineKPIsActive(Machine machine, LayerMask layerMask)
|
||||||
{
|
{
|
||||||
var dir = cam.camera.transform.localPosition - machine.centerPos;
|
var dir = cam.camera.transform.position - machine.centerPos;
|
||||||
var hit = new RaycastHit();
|
var hit = new RaycastHit();
|
||||||
|
|
||||||
if (Physics.Raycast(machine.centerPos, dir, out hit, Mathf.Infinity, layerMask))
|
if (Physics.Raycast(machine.centerPos, dir, out hit, Mathf.Infinity, layerMask))
|
||||||
@@ -159,9 +158,13 @@ namespace CHN
|
|||||||
if (hitCameraLayer)
|
if (hitCameraLayer)
|
||||||
{
|
{
|
||||||
if (!IsScreenRange(machine))
|
if (!IsScreenRange(machine))
|
||||||
return;
|
{
|
||||||
|
machine.machineKPI.Deactive();
|
||||||
machine.machineKPI.Active();
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
machine.machineKPI.Active();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using System;
|
|||||||
|
|
||||||
public class UI_MachineKPI : UIBase, IPointerClickHandler
|
public class UI_MachineKPI : UIBase, IPointerClickHandler
|
||||||
{
|
{
|
||||||
|
public KPIData data;
|
||||||
public RectTransform DefaultKPI;
|
public RectTransform DefaultKPI;
|
||||||
public RectTransform DetailsKPI;
|
public RectTransform DetailsKPI;
|
||||||
|
|
||||||
@@ -26,6 +27,7 @@ public class UI_MachineKPI : UIBase, IPointerClickHandler
|
|||||||
|
|
||||||
public void SetData(KPIData kpiData)
|
public void SetData(KPIData kpiData)
|
||||||
{
|
{
|
||||||
|
data = kpiData;
|
||||||
eorate = DecimalPointCalculate(kpiData.eorate);
|
eorate = DecimalPointCalculate(kpiData.eorate);
|
||||||
|
|
||||||
Default_eorate.SetText(eorate.ToString());
|
Default_eorate.SetText(eorate.ToString());
|
||||||
|
|||||||
@@ -240,7 +240,7 @@
|
|||||||
"sttm": "0804",
|
"sttm": "0804",
|
||||||
"totm": "",
|
"totm": "",
|
||||||
"goaltime": "718",
|
"goaltime": "718",
|
||||||
"ptotm": "2025-03-27 21:54:20",
|
"ptotm": "2025-03-28 22:55:24",
|
||||||
"psttm": "2025-03-26 08:04:35"
|
"psttm": "2025-03-26 08:04:35"
|
||||||
},
|
},
|
||||||
"isCheck": false
|
"isCheck": false
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
"sttm": "0834",
|
"sttm": "0834",
|
||||||
"totm": "",
|
"totm": "",
|
||||||
"goaltime": "719",
|
"goaltime": "719",
|
||||||
"ptotm": "2025-03-27 20:03:24",
|
"ptotm": "2025-03-28 22:57:46",
|
||||||
"psttm": "2025-03-26 08:34:28"
|
"psttm": "2025-03-26 08:34:28"
|
||||||
},
|
},
|
||||||
"isCheck": false
|
"isCheck": false
|
||||||
@@ -695,10 +695,10 @@
|
|||||||
"sttm": "1719",
|
"sttm": "1719",
|
||||||
"totm": "",
|
"totm": "",
|
||||||
"goaltime": "1439",
|
"goaltime": "1439",
|
||||||
"ptotm": "2025-03-28 08:52:56",
|
"ptotm": "2025-03-29 11:06:47",
|
||||||
"psttm": "2025-03-26 17:19:45"
|
"psttm": "2025-03-26 17:19:45"
|
||||||
},
|
},
|
||||||
"isCheck": true
|
"isCheck": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"completeInfo": {
|
"completeInfo": {
|
||||||
@@ -1097,7 +1097,7 @@
|
|||||||
"worknm": "U/SONIC WELD-2",
|
"worknm": "U/SONIC WELD-2",
|
||||||
"workseq": "1",
|
"workseq": "1",
|
||||||
"status": "1",
|
"status": "1",
|
||||||
"statusnm": "지그교환",
|
"statusnm": "가동중",
|
||||||
"itemcd": "24298734",
|
"itemcd": "24298734",
|
||||||
"itemdesc": "SCOOP ASM-DRV LINK LUB",
|
"itemdesc": "SCOOP ASM-DRV LINK LUB",
|
||||||
"pjtcd": "GF9",
|
"pjtcd": "GF9",
|
||||||
@@ -1325,7 +1325,7 @@
|
|||||||
"sttm": "1621",
|
"sttm": "1621",
|
||||||
"totm": "",
|
"totm": "",
|
||||||
"goaltime": "147",
|
"goaltime": "147",
|
||||||
"ptotm": "2025-03-28 11:13:08",
|
"ptotm": "2025-03-28 14:35:30",
|
||||||
"psttm": "2025-03-26 16:21:06"
|
"psttm": "2025-03-26 16:21:06"
|
||||||
},
|
},
|
||||||
"isCheck": false
|
"isCheck": false
|
||||||
@@ -1430,7 +1430,7 @@
|
|||||||
"sttm": "0757",
|
"sttm": "0757",
|
||||||
"totm": "",
|
"totm": "",
|
||||||
"goaltime": "426",
|
"goaltime": "426",
|
||||||
"ptotm": "2025-03-28 10:31:12",
|
"ptotm": "2025-03-28 15:03:32",
|
||||||
"psttm": "2025-03-26 07:57:08"
|
"psttm": "2025-03-26 07:57:08"
|
||||||
},
|
},
|
||||||
"isCheck": false
|
"isCheck": false
|
||||||
@@ -1640,7 +1640,7 @@
|
|||||||
"sttm": "1855",
|
"sttm": "1855",
|
||||||
"totm": "",
|
"totm": "",
|
||||||
"goaltime": "720",
|
"goaltime": "720",
|
||||||
"ptotm": "2025-03-27 20:29:00",
|
"ptotm": "2025-03-28 23:06:53",
|
||||||
"psttm": "2025-03-26 18:55:26"
|
"psttm": "2025-03-26 18:55:26"
|
||||||
},
|
},
|
||||||
"isCheck": false
|
"isCheck": false
|
||||||
|
|||||||
Reference in New Issue
Block a user