commit df6e2fe0699e4c1347d1bbddb4e3a44fc60a8aa8 Author: СтаниÑ�лав ХозÑ�енок Date: Mon Apr 7 10:57:03 2025 +0700 first commit diff --git a/API.meta b/API.meta new file mode 100644 index 0000000..8af26de --- /dev/null +++ b/API.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4e30640b3abb93642a825989a05339a1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/API/MTEGetMarksLabelsByArrPoint.meta b/API/MTEGetMarksLabelsByArrPoint.meta new file mode 100644 index 0000000..ebba276 --- /dev/null +++ b/API/MTEGetMarksLabelsByArrPoint.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d872f798ef1b3214ea27187d319cce1c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/API/MTEGetMarksLabelsByArrPoint/Data.cs b/API/MTEGetMarksLabelsByArrPoint/Data.cs new file mode 100644 index 0000000..9b856c9 --- /dev/null +++ b/API/MTEGetMarksLabelsByArrPoint/Data.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Assets.Scripts.API.MTEGetMarksLabelsByArrPoint +{ + [System.Serializable] + public class ApiResponse + { + public string error; + public ResponseData respose; + } + + [System.Serializable] + public class ResponseData + { + public Item[] items; + } + + [System.Serializable] + public class Item + { + public string aliases; + public string block_name; + public CenterPoint center_point; + public bool is_mark_detect; + } + + [System.Serializable] + public class CenterPoint + { + public float x; + public float y; + public float z; + } +} diff --git a/API/MTEGetMarksLabelsByArrPoint/Data.cs.meta b/API/MTEGetMarksLabelsByArrPoint/Data.cs.meta new file mode 100644 index 0000000..d804898 --- /dev/null +++ b/API/MTEGetMarksLabelsByArrPoint/Data.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5e4f00a28bac5814fa61edf72f1325b5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/MethodJSON.cs b/MethodJSON.cs new file mode 100644 index 0000000..e280773 --- /dev/null +++ b/MethodJSON.cs @@ -0,0 +1,42 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System; + +// Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse); +public class Item +{ + public List block_names_aliases { get; set; } + public int sn { get; set; } + public DateTime time { get; set; } + public DateTime time_mo { get; set; } + public float x { get; set; } + public float x_mo { get; set; } + public float y { get; set; } + public float y_mo { get; set; } + public float z { get; set; } + public float z_mo { get; set; } +} + +public class MarksTime +{ + public int count_seconds { get; set; } + public string name { get; set; } +} + +public class ResposeMethod +{ + public List items { get; set; } + public string tag { get; set; } + public string time_begin { get; set; } + public string time_end { get; set; } + public List marks_time { get; set; } +} + +public class MethodJSON +{ + public string error { get; set; } + public ResposeMethod respose { get; set; } + public int status { get; set; } +} + diff --git a/MethodJSON.cs.meta b/MethodJSON.cs.meta new file mode 100644 index 0000000..e346c51 --- /dev/null +++ b/MethodJSON.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0be947f1f89f1e2409163368a7209533 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/PersonScript.cs b/PersonScript.cs new file mode 100644 index 0000000..b3ca576 --- /dev/null +++ b/PersonScript.cs @@ -0,0 +1,261 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.AI; +using System; +using System.Globalization; +using UnityEngine.UIElements; + +public class PersonScript : MonoBehaviour +{ + [Header("Äàííûå ñîòðóäíèêà")] + public string FIO; //ÔÈÎ ñîòðóäíèêà + public string Tabnomer; //Ñåðèéíûé íîìåð ñîòðóäíèêà + [Header("Êîìïîíåíòû ñîòðóäíèêà")] + [SerializeField] private Animator PersonAnimator; //Àíèìàòîð + [SerializeField] private NavMeshAgent NavMeshAgent; //ÈÈ + [SerializeField] private int CurrentPoint; //Òåêóùàÿ òî÷êà + [SerializeField] private ThanksStASSForTheNiceMethod Delogger; //Ñêðèïò ñ äàííûìè + [SerializeField] private Uiika Uiika; + public VisualTreeAsset MainUIPrefab; + private Label TimeText; //UI êîìïîíåíòû --> + private Label CordsMoText; + private Label CordsRTLSText; + private Label PointText; + private Label TimeLabel; + private Label OtmetkaName; + private Label FullTime; + private Label SlidBegin; + private Label SlidEnd; + private ProgressBar ProgressBar; + private Button PlayButton; + private Button StopButton; + private Button BackButton; + private Slider Slider; + private SliderInt SliderTime; + private SliderInt SliderMove; // <-- UI êîìïîíåíòû + [SerializeField] private GameObject MoPointPrefab; //Ïðåôàá òî÷êè ÌÎ + [SerializeField] private GameObject RTLSPointPrefab; //Ïðåôàá òî÷êè ÐÒËÑ + [Header("UIDocument")] + public UIDocument UI; //UI + private GameObject moPoint; //ïàìÿòü î òî÷êå ÌÎ + private GameObject rtlsPoint; //ïàìÿòü î òî÷êå ÐÒËÑ + [Header("Äàííûå ÈÈ")] + public float WaitTime; //Âðåìÿ ïðîâåðêè òî÷êè + public float NavAgentSpeed; //Ñêîðîñòü ïåðåìåùåíèÿ ÈÈ + public Vector3 VectorDestination; //Òî÷êà íàçíà÷åíèÿ + public float RemainingDistance; // îñòàâøååñÿ ðàññòîÿíèå äî òî÷êè + [Space] + public bool Play; //Ïðîèãðûâàíèå õîæäåíèÿ + + public void InitMePlease() //Èíèöèàëèçàöèÿ UI è óñòàíîâêà íà÷àëüíûõ çíà÷åíèé + { + var root = UI.rootVisualElement; + + TimeText = root.Q