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