diff --git a/T3-Unity/Assets/Scenes/Map_Tests1.unity b/T3-Unity/Assets/Scenes/Map_Tests1.unity index 873906332b9a5165399680698bda1ad3b6fa8f63..1b91fa513b195cf1cdb2c655260e927445903804 100644 --- a/T3-Unity/Assets/Scenes/Map_Tests1.unity +++ b/T3-Unity/Assets/Scenes/Map_Tests1.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 170076734} - m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641258, b: 0.5748172, a: 1} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -590,7 +590,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -239.1, y: -63.8} + m_AnchoredPosition: {x: -239.1, y: -63.80005} m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &407924862 @@ -614,7 +614,7 @@ MonoBehaviour: m_GameObject: {fileID: 407924860} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 643478a71ee34d54f80bf90d40e00823, type: 3} + m_Script: {fileID: 11500000, guid: 0558445fdd473054d8458137a52c9532, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &407924864 @@ -846,7 +846,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -239.1, y: -63.8} + m_AnchoredPosition: {x: -239.1, y: -63.80005} m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &544484526 @@ -870,7 +870,7 @@ MonoBehaviour: m_GameObject: {fileID: 544484524} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 643478a71ee34d54f80bf90d40e00823, type: 3} + m_Script: {fileID: 11500000, guid: 35f716c36cb497c4abd55ab36117e21f, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &544484528 @@ -1461,7 +1461,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -99.8, y: -63.8} + m_AnchoredPosition: {x: -99.8, y: -63.80005} m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &681557069 @@ -1485,7 +1485,7 @@ MonoBehaviour: m_GameObject: {fileID: 681557067} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c47ceb5600e99564d8b1369275c62d23, type: 3} + m_Script: {fileID: 11500000, guid: 381c6406f05470e4d80e67c01b052343, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &681557071 @@ -1551,7 +1551,7 @@ GameObject: - component: {fileID: 687091620} - component: {fileID: 687091619} - component: {fileID: 687091618} - m_Layer: 4 + m_Layer: 5 m_Name: weak_obj_cp3 m_TagString: faible m_Icon: {fileID: 0} @@ -1570,7 +1570,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2091460426} - m_RootOrder: 9 + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} @@ -1598,7 +1598,7 @@ MonoBehaviour: m_GameObject: {fileID: 687091616} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: df0e122aa4cdf49458d0cc812b157a5e, type: 3} + m_Script: {fileID: 11500000, guid: db3be0d521276d24a870a51c8a70b8cf, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &687091620 @@ -1911,18 +1911,16 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 37fbb0aa1ad2c2442ad9509b246ad3fd, type: 3} m_Name: m_EditorClassIdentifier: + spawnedObjects: [] + parent: {fileID: 1041475211} _map: {fileID: 703254553} _locations: [] _spawnScale: 1 _spawnScaleStartEnd: 6 _markerPrefab: {fileID: 901362092215755285, guid: 18761a72aa6233c4bb4bd29dd401981e, type: 3} - _prefabDebut: {fileID: 2042676738254883600, guid: adcf133badada334581b9bd798be23cd, - type: 3} - _prefabFin: {fileID: 5106668611982552037, guid: 6a798f905f6b7dd4ea45b512de8e4537, - type: 3} - _spawnedObjects: [] - parent: {fileID: 1041475211} + _startPrefab: {fileID: 0} + _endPrefab: {fileID: 0} --- !u!1 &729711190 GameObject: m_ObjectHideFlags: 0 @@ -2389,7 +2387,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -99.8, y: -63.8} + m_AnchoredPosition: {x: -99.8, y: -63.80005} m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &826053355 @@ -2413,7 +2411,7 @@ MonoBehaviour: m_GameObject: {fileID: 826053353} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c47ceb5600e99564d8b1369275c62d23, type: 3} + m_Script: {fileID: 11500000, guid: 7c4988414bbe35d4697292a075e2d021, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &826053357 @@ -2853,7 +2851,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2091460426} - m_RootOrder: 8 + m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} @@ -2881,7 +2879,7 @@ MonoBehaviour: m_GameObject: {fileID: 1030109115} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: df0e122aa4cdf49458d0cc812b157a5e, type: 3} + m_Script: {fileID: 11500000, guid: 70fd3cda782b30a46bd4d02cdfe5ec7a, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &1030109119 @@ -3117,7 +3115,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 46bc6c53f411bc84882c76fe1694830a, type: 3} m_Name: m_EditorClassIdentifier: - _prefab: {fileID: 901362092215755284, guid: 18761a72aa6233c4bb4bd29dd401981e, type: 3} _prefabs_parent: {fileID: 1041475211} --- !u!4 &1041475211 Transform: @@ -3170,7 +3167,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -239.1, y: -63.8} + m_AnchoredPosition: {x: -239.1, y: -63.80005} m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1048792314 @@ -3194,7 +3191,7 @@ MonoBehaviour: m_GameObject: {fileID: 1048792312} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 643478a71ee34d54f80bf90d40e00823, type: 3} + m_Script: {fileID: 11500000, guid: 2fd0675a5d5039f4c8257b230bea0a3b, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &1048792316 @@ -3606,7 +3603,7 @@ GameObject: - component: {fileID: 1331080349} - component: {fileID: 1331080348} - component: {fileID: 1331080347} - m_Layer: 0 + m_Layer: 5 m_Name: weak_obj m_TagString: faible m_Icon: {fileID: 0} @@ -3625,7 +3622,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2091460426} - m_RootOrder: 12 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} @@ -4041,7 +4038,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -239.1, y: -63.8} + m_AnchoredPosition: {x: -239.1, y: -63.80005} m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1465290608 @@ -4065,7 +4062,7 @@ MonoBehaviour: m_GameObject: {fileID: 1465290606} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 643478a71ee34d54f80bf90d40e00823, type: 3} + m_Script: {fileID: 11500000, guid: 1879fa4233ba4ce4d9d98fefbf14af00, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &1465290610 @@ -4154,7 +4151,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -239.1, y: -63.8} + m_AnchoredPosition: {x: -239.1, y: -63.80005} m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1470260039 @@ -4244,7 +4241,7 @@ GameObject: - component: {fileID: 1476899020} - component: {fileID: 1476899019} - component: {fileID: 1476899018} - m_Layer: 1 + m_Layer: 5 m_Name: weak_obj_cp1 m_TagString: faible m_Icon: {fileID: 0} @@ -4263,7 +4260,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2091460426} - m_RootOrder: 10 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} @@ -4291,7 +4288,7 @@ MonoBehaviour: m_GameObject: {fileID: 1476899016} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: df0e122aa4cdf49458d0cc812b157a5e, type: 3} + m_Script: {fileID: 11500000, guid: f3f272662fdee094386405520dc143be, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &1476899020 @@ -4719,7 +4716,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -99.8, y: -63.8} + m_AnchoredPosition: {x: -99.8, y: -63.80005} m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1522733310 @@ -4743,7 +4740,7 @@ MonoBehaviour: m_GameObject: {fileID: 1522733308} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c47ceb5600e99564d8b1369275c62d23, type: 3} + m_Script: {fileID: 11500000, guid: 8bbe8a6fafd662a4cac08781fba2eeaf, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &1522733312 @@ -5142,7 +5139,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -99.8, y: -63.8} + m_AnchoredPosition: {x: -99.8, y: -63.80005} m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1765147582 @@ -5166,7 +5163,7 @@ MonoBehaviour: m_GameObject: {fileID: 1765147580} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c47ceb5600e99564d8b1369275c62d23, type: 3} + m_Script: {fileID: 11500000, guid: d7cbbefc79f7a0247a9df50278d2ad14, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &1765147584 @@ -5307,7 +5304,7 @@ GameObject: - component: {fileID: 1896602726} - component: {fileID: 1896602725} m_Layer: 5 - m_Name: 'strong_obj ' + m_Name: strong_obj m_TagString: fort m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -5329,7 +5326,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -99.8, y: -63.8} + m_AnchoredPosition: {x: -99.8, y: -63.80005} m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1896602725 @@ -5419,7 +5416,7 @@ GameObject: - component: {fileID: 1901878077} - component: {fileID: 1901878076} - component: {fileID: 1901878075} - m_Layer: 2 + m_Layer: 5 m_Name: weak_obj_cp2 m_TagString: faible m_Icon: {fileID: 0} @@ -5438,7 +5435,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2091460426} - m_RootOrder: 11 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} @@ -5466,7 +5463,7 @@ MonoBehaviour: m_GameObject: {fileID: 1901878073} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: df0e122aa4cdf49458d0cc812b157a5e, type: 3} + m_Script: {fileID: 11500000, guid: a274798eef6ea514d9ba6ac6a71837bd, type: 3} m_Name: m_EditorClassIdentifier: --- !u!114 &1901878077 @@ -5798,11 +5795,11 @@ RectTransform: - {fileID: 1953152065} - {fileID: 755087652} - {fileID: 52237255} - - {fileID: 1030109116} - - {fileID: 687091617} + - {fileID: 1331080346} - {fileID: 1476899017} - {fileID: 1901878074} - - {fileID: 1331080346} + - {fileID: 687091617} + - {fileID: 1030109116} - {fileID: 1470260038} - {fileID: 1048792313} - {fileID: 407924861} diff --git a/T3-Unity/Assets/Scripts/Obstacle/Medium.meta b/T3-Unity/Assets/Scripts/Obstacle/Medium.meta new file mode 100644 index 0000000000000000000000000000000000000000..54022ddbac538ff80dbc6b2450eceabdd2728b26 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Medium.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71a363b66c0529b43a7fc475fb39888a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/DragDropM.cs b/T3-Unity/Assets/Scripts/Obstacle/Medium/DragDropM.cs similarity index 100% rename from T3-Unity/Assets/Scripts/Obstacle/DragDropM.cs rename to T3-Unity/Assets/Scripts/Obstacle/Medium/DragDropM.cs diff --git a/T3-Unity/Assets/Scripts/Obstacle/DragDropM.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Medium/DragDropM.cs.meta similarity index 100% rename from T3-Unity/Assets/Scripts/Obstacle/DragDropM.cs.meta rename to T3-Unity/Assets/Scripts/Obstacle/Medium/DragDropM.cs.meta diff --git a/T3-Unity/Assets/Scripts/Obstacle/midObj.cs b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj.cs similarity index 82% rename from T3-Unity/Assets/Scripts/Obstacle/midObj.cs rename to T3-Unity/Assets/Scripts/Obstacle/Medium/midObj.cs index 50f98234ce40979a4737b2b37f9cfa7e3ef0a6a4..5828d1c6be43f0973238c25dd658b9317ee7685d 100644 --- a/T3-Unity/Assets/Scripts/Obstacle/midObj.cs +++ b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj.cs @@ -6,25 +6,22 @@ using UnityEngine.EventSystems; public class midObj : MonoBehaviour, IDropHandler { private GameObject go; - public void OnDrop(PointerEventData eventData) { - - Ui.nameObj = GameObject.FindWithTag("moyen").tag; + + Ui.nameObj = GameObject.Find("normal_obj").name; float objx = GameObject.Find("bin").transform.position.x; float objy = GameObject.Find("bin").transform.position.y; if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) { - go = GameObject.FindWithTag("moyen"); + go = GameObject.Find("normal_obj"); Destroy(go); Ui.difficulty = Ui.difficulty - 2; Ui.nbObst = Ui.nbObst + 1; - } - - + } } } diff --git a/T3-Unity/Assets/Scripts/Obstacle/midObj.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj.cs.meta similarity index 100% rename from T3-Unity/Assets/Scripts/Obstacle/midObj.cs.meta rename to T3-Unity/Assets/Scripts/Obstacle/Medium/midObj.cs.meta diff --git a/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj1.cs b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj1.cs new file mode 100644 index 0000000000000000000000000000000000000000..0a2b6a7ddedf6020462557f177049a37fcf200be --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj1.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class midObj1 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("normal_obj_cp1").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("normal_obj_cp1"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 2; + Ui.nbObst = Ui.nbObst + 1; + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj1.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj1.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..465ba60995a2143e31bf0da3467da06384ae6966 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj1.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2fd0675a5d5039f4c8257b230bea0a3b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj2.cs b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj2.cs new file mode 100644 index 0000000000000000000000000000000000000000..e004dcce508710c78b740a241f8fd837b7b5e1e6 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj2.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class midObj2 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("normal_obj_cp2").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("normal_obj_cp2"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 2; + Ui.nbObst = Ui.nbObst + 1; + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj2.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj2.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..fb65b22a76db92428083cd68afa00b360b9ced3c --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj2.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0558445fdd473054d8458137a52c9532 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj3.cs b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj3.cs new file mode 100644 index 0000000000000000000000000000000000000000..c40136cd463f99f0e44472d123f3d7ae9dd39193 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj3.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class midObj3 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("normal_obj_cp3").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("normal_obj_cp3"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 2; + Ui.nbObst = Ui.nbObst + 1; + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj3.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj3.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..25c7668af6691b23e252a055ad54418991b98c34 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj3.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1879fa4233ba4ce4d9d98fefbf14af00 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj4.cs b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj4.cs new file mode 100644 index 0000000000000000000000000000000000000000..3978dfde27cf52bdc0f4cb725f8686d234466932 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj4.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class midObj4 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("normal_obj_cp4").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("normal_obj_cp4"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 2; + Ui.nbObst = Ui.nbObst + 1; + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj4.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj4.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..88a2315940a9a054cbfa8ca615f008a0430eb53e --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Medium/midObj4.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 35f716c36cb497c4abd55ab36117e21f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/Strong.meta b/T3-Unity/Assets/Scripts/Obstacle/Strong.meta new file mode 100644 index 0000000000000000000000000000000000000000..51da72ae0a0fe67de4ad58a37f5e08b8035b4b88 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Strong.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 25494a613f3017c4cb8892c686aa19fa +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/DragDropS.cs b/T3-Unity/Assets/Scripts/Obstacle/Strong/DragDropS.cs similarity index 100% rename from T3-Unity/Assets/Scripts/Obstacle/DragDropS.cs rename to T3-Unity/Assets/Scripts/Obstacle/Strong/DragDropS.cs diff --git a/T3-Unity/Assets/Scripts/Obstacle/DragDropS.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Strong/DragDropS.cs.meta similarity index 100% rename from T3-Unity/Assets/Scripts/Obstacle/DragDropS.cs.meta rename to T3-Unity/Assets/Scripts/Obstacle/Strong/DragDropS.cs.meta diff --git a/T3-Unity/Assets/Scripts/Obstacle/strongObj.cs b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj.cs similarity index 86% rename from T3-Unity/Assets/Scripts/Obstacle/strongObj.cs rename to T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj.cs index ae027cee8a255fb9988db0b5ee664b6b38df4b5d..0d1e1b853e13b01fe2d4303984ac79e0d37e08f6 100644 --- a/T3-Unity/Assets/Scripts/Obstacle/strongObj.cs +++ b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj.cs @@ -10,14 +10,14 @@ public class strongObj : MonoBehaviour, IDropHandler public void OnDrop(PointerEventData eventData) { - Ui.nameObj = GameObject.FindWithTag("fort").tag; + Ui.nameObj = GameObject.Find("strong_obj").name; float objx = GameObject.Find("bin").transform.position.x; float objy = GameObject.Find("bin").transform.position.y; if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) { - go = GameObject.FindWithTag("fort"); + go = GameObject.Find("strong_obj"); Destroy(go); Ui.difficulty = Ui.difficulty - 3; Ui.nbObst = Ui.nbObst + 1; diff --git a/T3-Unity/Assets/Scripts/Obstacle/strongObj.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj.cs.meta similarity index 100% rename from T3-Unity/Assets/Scripts/Obstacle/strongObj.cs.meta rename to T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj.cs.meta diff --git a/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj1.cs b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj1.cs new file mode 100644 index 0000000000000000000000000000000000000000..fc5077695c8c85820b1c3b6b31516fd56f246bab --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj1.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class strongObj1 : MonoBehaviour,IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("strong_obj_cp1").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("strong_obj_cp1"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 3; + Ui.nbObst = Ui.nbObst + 1; + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj1.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj1.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..524d9539257e755a37ed287b019c5c6fe563bf1a --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj1.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7c4988414bbe35d4697292a075e2d021 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj2.cs b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj2.cs new file mode 100644 index 0000000000000000000000000000000000000000..1c9add8432c04a46258c74fa2c34b2cbccf0107e --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj2.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class strongObj2 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("strong_obj_cp2").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("strong_obj_cp2"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 3; + Ui.nbObst = Ui.nbObst + 1; + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj2.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj2.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..2e46e189113b04173e3003e9abe9bdda37d2b316 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj2.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d7cbbefc79f7a0247a9df50278d2ad14 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj3.cs b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj3.cs new file mode 100644 index 0000000000000000000000000000000000000000..36e1ad8dff847dbfa9eb01c8e9f464e60c6c37fd --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj3.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class strongObj3 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("strong_obj_cp3").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("strong_obj_cp3"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 3; + Ui.nbObst = Ui.nbObst + 1; + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj3.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj3.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..fabb1f18bde4a7bbe1951ab84b65e34ee6082b6b --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj3.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8bbe8a6fafd662a4cac08781fba2eeaf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj4.cs b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj4.cs new file mode 100644 index 0000000000000000000000000000000000000000..8b043d1ce63c5f3c37816fcf96d5bec799d47af3 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj4.cs @@ -0,0 +1,27 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class strongObj4 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("strong_obj_cp4").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("strong_obj_cp4"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 3; + Ui.nbObst = Ui.nbObst + 1; + } + + } +} + diff --git a/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj4.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj4.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f3221431eeec41d689a88488e4de508fb1687b4b --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/Strong/strongObj4.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 381c6406f05470e4d80e67c01b052343 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/weak.meta b/T3-Unity/Assets/Scripts/Obstacle/weak.meta new file mode 100644 index 0000000000000000000000000000000000000000..e32846c858034501ffee67cbc5af8514d7b995da --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/weak.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 79545223360834a40b2a80bc7789b6a0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/DragDropW.cs b/T3-Unity/Assets/Scripts/Obstacle/weak/DragDropW.cs similarity index 100% rename from T3-Unity/Assets/Scripts/Obstacle/DragDropW.cs rename to T3-Unity/Assets/Scripts/Obstacle/weak/DragDropW.cs diff --git a/T3-Unity/Assets/Scripts/Obstacle/DragDropW.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/weak/DragDropW.cs.meta similarity index 100% rename from T3-Unity/Assets/Scripts/Obstacle/DragDropW.cs.meta rename to T3-Unity/Assets/Scripts/Obstacle/weak/DragDropW.cs.meta diff --git a/T3-Unity/Assets/Scripts/Obstacle/weakObj.cs b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj.cs similarity index 85% rename from T3-Unity/Assets/Scripts/Obstacle/weakObj.cs rename to T3-Unity/Assets/Scripts/Obstacle/weak/weakObj.cs index b5401ec19a10095a3f77dfdf5e30c539dbfd9b8b..2ed57a9abc30ea458e55360adc2f537f2858ebdb 100644 --- a/T3-Unity/Assets/Scripts/Obstacle/weakObj.cs +++ b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj.cs @@ -9,15 +9,15 @@ public class weakObj : MonoBehaviour, IDropHandler public void OnDrop(PointerEventData eventData) { - - Ui.nameObj = GameObject.FindWithTag("faible").tag; + + Ui.nameObj = GameObject.Find("weak_obj").name; float objx = GameObject.Find("bin").transform.position.x; float objy = GameObject.Find("bin").transform.position.y; if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) { - go = GameObject.FindWithTag("faible"); + go = GameObject.Find("weak_obj"); Destroy(go); Ui.difficulty = Ui.difficulty - 1; Ui.nbObst = Ui.nbObst + 1; diff --git a/T3-Unity/Assets/Scripts/Obstacle/weakObj.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj.cs.meta similarity index 100% rename from T3-Unity/Assets/Scripts/Obstacle/weakObj.cs.meta rename to T3-Unity/Assets/Scripts/Obstacle/weak/weakObj.cs.meta diff --git a/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj1.cs b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj1.cs new file mode 100644 index 0000000000000000000000000000000000000000..e1e08de13cacf89b2e2b15be088c2c8914ae89f7 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj1.cs @@ -0,0 +1,28 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class weakObj1 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("weak_obj_cp1").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("weak_obj_cp1"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 1; + Ui.nbObst = Ui.nbObst + 1; + + + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj1.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj1.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..27bc3a78aebc7d811ab1ed0c30f9b7f52d24ba20 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj1.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f3f272662fdee094386405520dc143be +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj2.cs b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj2.cs new file mode 100644 index 0000000000000000000000000000000000000000..0615f08c035e8841fe9e0bf860e78d9bd50980c5 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj2.cs @@ -0,0 +1,28 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class weakObj2 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("weak_obj_cp2").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("weak_obj_cp2"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 1; + Ui.nbObst = Ui.nbObst + 1; + + + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj2.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj2.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..afe1865ef1d9553f45bcf859635bdecf694988f4 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj2.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a274798eef6ea514d9ba6ac6a71837bd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj3.cs b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj3.cs new file mode 100644 index 0000000000000000000000000000000000000000..a92cd7055c5b2dd59b29b43c5a1d086dbd3c8521 --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj3.cs @@ -0,0 +1,28 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class weakObj3 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("weak_obj_cp3").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("weak_obj_cp3"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 1; + Ui.nbObst = Ui.nbObst + 1; + + + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj3.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj3.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..586ce593e4942a866e14cd5b2d9a5728dddb590f --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj3.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: db3be0d521276d24a870a51c8a70b8cf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj4.cs b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj4.cs new file mode 100644 index 0000000000000000000000000000000000000000..cb6e5dbc4053ea63ade2b22d5c58bffa8a12ac6b --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj4.cs @@ -0,0 +1,28 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; +public class weakObj4 : MonoBehaviour, IDropHandler +{ + private GameObject go; + + public void OnDrop(PointerEventData eventData) + { + + Ui.nameObj = GameObject.Find("weak_obj_cp4").name; + + float objx = GameObject.Find("bin").transform.position.x; + float objy = GameObject.Find("bin").transform.position.y; + + if (objx + 90 > Input.mousePosition.x && objx - 90 < Input.mousePosition.x && objy + 90 > Input.mousePosition.y && objy - 90 < Input.mousePosition.y) + { + go = GameObject.Find("weak_obj_cp4"); + Destroy(go); + Ui.difficulty = Ui.difficulty - 1; + Ui.nbObst = Ui.nbObst + 1; + + + } + + } +} diff --git a/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj4.cs.meta b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj4.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ebb589a3d05af87ef53173a92b7bf720d527f33c --- /dev/null +++ b/T3-Unity/Assets/Scripts/Obstacle/weak/weakObj4.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 70fd3cda782b30a46bd4d02cdfe5ec7a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: