diff --git a/Assets/Scenes/RoboSub2019.unity b/Assets/Scenes/RoboSub2019.unity index 4efad9c5..0dd8507c 100755 --- a/Assets/Scenes/RoboSub2019.unity +++ b/Assets/Scenes/RoboSub2019.unity @@ -120,6 +120,12 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!4 &31472223 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 8659837571720475807, guid: a3a0cca5d346f0840b5c29fe80612d07, + type: 3} + m_PrefabInstance: {fileID: 8659837570782410310} + m_PrefabAsset: {fileID: 0} --- !u!4 &267303360 stripped Transform: m_CorrespondingSourceObject: {fileID: 400002, guid: 4cdde95925ad7a842abe1dde8539354b, @@ -212,6 +218,51 @@ Transform: type: 3} m_PrefabInstance: {fileID: 3705333200093046295} m_PrefabAsset: {fileID: 0} +--- !u!1 &618658655 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 618658656} + - component: {fileID: 618658657} + m_Layer: 0 + m_Name: Sonar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &618658656 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 618658655} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 31472223} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &618658657 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 618658655} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8668489e9b544524db94ceab3bd9b027, type: 3} + m_Name: + m_EditorClassIdentifier: + viewRadious: 0 + tasks: {fileID: 3705333199070647808} --- !u!4 &770608637 stripped Transform: m_CorrespondingSourceObject: {fileID: 400032, guid: 5f066c25dd1843b45b91b95fbc554ceb, @@ -522,6 +573,27 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: a5b50892273f3234fade02ce2357559c, type: 3} m_Name: m_EditorClassIdentifier: + objectBigSettings: + minRadius: 3 + maxRadius: 8 + waterLevel: 11 + maxDepth: 4 + othMaxDepth: 2 + cameraFov: 40 + objectSmallSettings: + minRadius: 1.5 + maxRadius: 3 + waterLevel: 9 + maxDepth: 7.5 + othMaxDepth: 3 + cameraFov: 40 + objectBottomSettings: + minRadius: 1.5 + maxRadius: 4 + waterLevel: 11 + maxDepth: 9 + othMaxDepth: 3 + cameraFov: 40 objectSettings: - target: {fileID: 4282235253200172265} targetAnnotation: {fileID: 4282235253200172265} diff --git a/Assets/Resources.meta b/Assets/Scripts/Robot/functionality.meta similarity index 77% rename from Assets/Resources.meta rename to Assets/Scripts/Robot/functionality.meta index ca89df2e..d7fc3509 100644 --- a/Assets/Resources.meta +++ b/Assets/Scripts/Robot/functionality.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1cf495f6a95d11d4599de9606627125d +guid: 7598b107ae3f7d643b46722914a27f14 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/Robot/functionality/Sonar.cs b/Assets/Scripts/Robot/functionality/Sonar.cs new file mode 100644 index 00000000..039b6004 --- /dev/null +++ b/Assets/Scripts/Robot/functionality/Sonar.cs @@ -0,0 +1,63 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System.Linq; + + +namespace Robot +{ + public class Sonar : MonoBehaviour + { + + [SerializeField] + private float _viewRadious; + private string nameTasksObject = "TasksFolder"; + private Dictionary _objectsInSonarArea; + + public Dictionary objectsInSonarArea + { + get { return _objectsInSonarArea; } + } + + public float viewRadious + { + get { return _viewRadious; } + } + + private void Start() + { + Transform tasks = GameObject.FindWithTag(nameTasksObject).transform; + _objectsInSonarArea = new Dictionary(); + + + + for (int ID = 0; ID < tasks.childCount; ID++) + { + _objectsInSonarArea.Add(tasks.GetChild(ID), 0); + } + + } + + void Update() + { + + for (int i = 0; i < _objectsInSonarArea.Count; i++) + { + + var element = _objectsInSonarArea.ElementAt(i); + + + if (Vector3.Distance(element.Key.position, transform.position) <= _viewRadious) + { + _objectsInSonarArea[element.Key] = 1; + } + else + { + _objectsInSonarArea[element.Key] = 0; + } + + } + + } + } +} diff --git a/Assets/Scripts/Robot/functionality/Sonar.cs.meta b/Assets/Scripts/Robot/functionality/Sonar.cs.meta new file mode 100644 index 00000000..6ab5ec6f --- /dev/null +++ b/Assets/Scripts/Robot/functionality/Sonar.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8668489e9b544524db94ceab3bd9b027 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Logs/Packages-Update.log b/Logs/Packages-Update.log index 9119d456..0cfeca6c 100755 --- a/Logs/Packages-Update.log +++ b/Logs/Packages-Update.log @@ -12,7 +12,7 @@ The following packages were updated: com.unity.package-manager-ui from version 1.9.11 to 2.0.3 com.unity.textmeshpro from version 1.2.4 to 1.3.0 -=== Tue Nov 12 19:10:36 2019 +=== Fri Dec 6 16:57:51 2019 Packages were changed. Update Mode: updateDependencies @@ -35,3 +35,11 @@ The following packages were updated: com.unity.package-manager-ui from version 2.0.3 to 2.2.0 com.unity.purchasing from version 2.0.3 to 2.0.6 com.unity.textmeshpro from version 1.3.0 to 2.0.1 + +=== Tue Jan 14 08:55:08 2020 + +Packages were changed. +Update Mode: updateDependencies + +The following packages were updated: + com.unity.ide.vscode from version 1.1.2 to 1.1.3 diff --git a/Packages/manifest.json b/Packages/manifest.json index 9f97e240..9320c112 100755 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -7,7 +7,7 @@ "com.unity.collab-proxy": "1.2.16", "com.unity.ext.nunit": "1.0.0", "com.unity.ide.rider": "1.1.0", - "com.unity.ide.vscode": "1.1.2", + "com.unity.ide.vscode": "1.1.3", "com.unity.multiplayer-hlapi": "1.0.2", "com.unity.package-manager-ui": "2.2.0", "com.unity.purchasing": "2.0.6", diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 89d0ada0..5c5c4691 100755 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2019.2.9f1 -m_EditorVersionWithRevision: 2019.2.9f1 (ebce4d76e6e8) +m_EditorVersion: 2019.2.17f1 +m_EditorVersionWithRevision: 2019.2.17f1 (8e603399ca02)