diff --git a/Assets/Model/Prefab/Container.prefab b/Assets/Model/Prefab/Container.prefab index 08579aa5..be07daac 100644 --- a/Assets/Model/Prefab/Container.prefab +++ b/Assets/Model/Prefab/Container.prefab @@ -49,6 +49,9 @@ MonoBehaviour: modelType: Sink modelID: nodeID: + eventShipItem: items_shipped_successfully + eventRemoveItem: item_removed_from_queue + totalShipped: 0 --- !u!1001 &7399670728975469901 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Simulation_0.0.1.unity b/Assets/Scenes/Simulation_0.0.1.unity index 28f6cb43..44161767 100644 --- a/Assets/Scenes/Simulation_0.0.1.unity +++ b/Assets/Scenes/Simulation_0.0.1.unity @@ -6874,6 +6874,30 @@ PrefabInstance: propertyPath: m_AnchorMax.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 2307873482672832875, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2307873482672832875, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3164975517789104253, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3164975517789104253, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3164975517789104253, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3164975517789104253, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3512657831314021627, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3} propertyPath: m_SizeDelta.x value: 0 @@ -6894,6 +6918,14 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 7770922069808366893, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7770922069808366893, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 7884294797245305317, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3} propertyPath: m_Name value: ObjectLibrary diff --git a/Assets/Scripts/ClickHandler.cs b/Assets/Scripts/ClickHandler.cs index 2fad4b03..2e91d83e 100644 --- a/Assets/Scripts/ClickHandler.cs +++ b/Assets/Scripts/ClickHandler.cs @@ -7,6 +7,8 @@ public class ClickHandler : MonoBehaviour public ModelObjectStatus objStatus; public float clickDurationThreshold = 0.2f; public float clickDistanceThreshold = 0.5f; + public float doubleClickThreshold = 0.2f; + float clickStart = 0; Vector3 clickStartPos; public enum InputState @@ -26,6 +28,10 @@ public class ClickHandler : MonoBehaviour { clickStart = Time.time; clickStartPos = Input.mousePosition; + } + else if (Input.GetMouseButtonDown(1)) + { + } else if (Input.GetMouseButtonUp(0)) { diff --git a/Assets/Scripts/Manager/PathManager.cs b/Assets/Scripts/Manager/PathManager.cs index 6324900c..3e1fc71c 100644 --- a/Assets/Scripts/Manager/PathManager.cs +++ b/Assets/Scripts/Manager/PathManager.cs @@ -1,7 +1,8 @@ using UnityEngine; - +using System.Collections.Generic; public class PathManager : UnitySingleton { + List nodes = new List(); // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { @@ -13,10 +14,5 @@ public class PathManager : UnitySingleton { } -} -public class SimulationPath -{ - public SimulationPath prev; - public SimulationPath next; -} \ No newline at end of file +} \ No newline at end of file diff --git a/Assets/Scripts/SimulationModels/SimulationModelSink.cs b/Assets/Scripts/SimulationModels/SimulationModelSink.cs index 47842db5..850402e1 100644 --- a/Assets/Scripts/SimulationModels/SimulationModelSink.cs +++ b/Assets/Scripts/SimulationModels/SimulationModelSink.cs @@ -6,7 +6,7 @@ using System.Collections; public class SimulationModelSink : SimulationModel { public string eventShipItem = "items_shipped_successfully"; - public string eventRemoveItem = "product_defective"; + public string eventRemoveItem = "item_removed_from_queue"; public int totalShipped = 0; ConcurrentQueue dataQueue; // Start is called once before the first execution of Update after the MonoBehaviour is created diff --git a/Assets/Scripts/SimulationPathNode.cs b/Assets/Scripts/SimulationPathNode.cs new file mode 100644 index 00000000..422e472c --- /dev/null +++ b/Assets/Scripts/SimulationPathNode.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +public class SimulationPathNode : MonoBehaviour +{ + public SimulationPathNode prevNode; + public SimulationPathNode nextNode; + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/Assets/Scripts/SimulationPathNode.cs.meta b/Assets/Scripts/SimulationPathNode.cs.meta new file mode 100644 index 00000000..f99b2586 --- /dev/null +++ b/Assets/Scripts/SimulationPathNode.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 057aed38343026f42baf4fb2b77a7597 \ No newline at end of file