Сделал изменение цвета завершённых пунктов и текущего
This commit is contained in:
1 parent
b167fc448f
commit
9e7457b818
20 files changed
+11178
-10685
No files matched your search
@@ -1,7 +1,9 @@
|
||||
using Palmmedia.ReportGenerator.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
public class MachineCoordinatesMovementScript : MonoBehaviour
|
||||
@@ -71,7 +73,11 @@ public class MachineCoordinatesMovementScript : MonoBehaviour
|
||||
static public List<Vector3> CurrentProgram { get; private set; }
|
||||
static public List<Vector3> ComponentsHoldersCords { get; private set; }
|
||||
|
||||
[Serializable]
|
||||
public class MachineStepEvent : UnityEvent<int> { }
|
||||
|
||||
[Tooltip("Event called when step updated")]
|
||||
public static MachineStepEvent OnStep = new MachineStepEvent();
|
||||
|
||||
// Ãðàíèöû ïî êîîðäèíàòàì: (0.435, 0.02, 0.4125)
|
||||
|
||||
@@ -133,6 +139,7 @@ public class MachineCoordinatesMovementScript : MonoBehaviour
|
||||
else
|
||||
{
|
||||
CurrentStep++;
|
||||
OnStep?.Invoke(CurrentStep);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -153,6 +160,7 @@ public class MachineCoordinatesMovementScript : MonoBehaviour
|
||||
Restart = true;
|
||||
CurrentProgram = new(program);
|
||||
CurrentStep = 0;
|
||||
OnStep?.Invoke(CurrentStep);
|
||||
}
|
||||
|
||||
public void MaterialInserted(int index)
|
||||
@@ -264,6 +272,7 @@ public class MachineCoordinatesMovementScript : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
//Vector3.MoveTowards()
|
||||
XAxis.localPosition = new(cords.x, XAxis.localPosition.y, XAxis.localPosition.z);
|
||||
YAxis.localPosition = new(YAxis.localPosition.x, cords.y, YAxis.localPosition.z);
|
||||
ZAxis.localPosition = new(ZAxis.localPosition.x, ZAxis.localPosition.y, cords.z);
|
||||
|
||||
Reference in new issue
Block a user