diff --git a/T3-Unity/Assets/Scenes/Map_Tests1.unity b/T3-Unity/Assets/Scenes/Map_Tests1.unity index 7211a3960fb1e07e70859b9e16bdce1add689125..86732d4456a7754b62845267bfa9fa0248010d01 100644 --- a/T3-Unity/Assets/Scenes/Map_Tests1.unity +++ b/T3-Unity/Assets/Scenes/Map_Tests1.unity @@ -1046,8 +1046,8 @@ 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: -0.0000075172, y: -45.30005} - m_SizeDelta: {x: 915.99805, y: 83.7728} + m_AnchoredPosition: {x: 0.000030518, y: -71.4541} + m_SizeDelta: {x: 888.2423, y: 66.11261} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &567138931 MonoBehaviour: @@ -1943,9 +1943,9 @@ RectTransform: m_Father: {fileID: 2091460426} m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -137.91, y: 326.39} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: -137.91, y: -117.60986} m_SizeDelta: {x: 237.37445, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &755087653 @@ -3317,7 +3317,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: -330, y: -44.67407} + m_AnchoredPosition: {x: -331, y: -46} m_SizeDelta: {x: 70.45709, y: 82.51976} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1331080347 @@ -3851,10 +3851,10 @@ RectTransform: m_Father: {fileID: 2091460426} m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -230, y: 399.05} - m_SizeDelta: {x: 70.45709, y: 82.51976} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: -241, y: -46} + m_SizeDelta: {x: 70.45709, y: 82.519775} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1470260039 CanvasGroup: @@ -4687,10 +4687,10 @@ RectTransform: m_Father: {fileID: 2091460426} m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -125, y: 398.43} - m_SizeDelta: {x: 70.45709, y: 82.51976} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: -150, y: -46} + m_SizeDelta: {x: 70.45709, y: 82.519775} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1896602725 CanvasGroup: @@ -4728,7 +4728,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 113da985b8fd6a14693d1c93fa5af6b4, type: 3} m_Name: m_EditorClassIdentifier: - canvas: {fileID: 0} + canvas: {fileID: 2091460429} textshowed: {fileID: 0} --- !u!114 &1896602728 MonoBehaviour: diff --git a/T3-Unity/Assets/Scripts/IA/RunnersFactory.cs b/T3-Unity/Assets/Scripts/IA/RunnersFactory.cs index 21460fdf48f3088a79154a6e3390e294ce073789..b5b4a840bdd160802e499c82af64063b5c4624bd 100644 --- a/T3-Unity/Assets/Scripts/IA/RunnersFactory.cs +++ b/T3-Unity/Assets/Scripts/IA/RunnersFactory.cs @@ -23,7 +23,7 @@ instance = this; rdn = new System.Random(); - nbJoueur = 5 + Ui.rep * 2; + nbJoueur = 5 + Ui.fame * 2; for (int i = 0; i < nbJoueur; i++) { diff --git a/T3-Unity/Assets/Scripts/Obstacle/midObj.cs b/T3-Unity/Assets/Scripts/Obstacle/midObj.cs index 7a627d7e83593e3aaaa65ab187aa6ceeab57adab..079eebe2359e707e69f9541b7429ea376d9b41de 100644 --- a/T3-Unity/Assets/Scripts/Obstacle/midObj.cs +++ b/T3-Unity/Assets/Scripts/Obstacle/midObj.cs @@ -10,6 +10,9 @@ public class midObj : MonoBehaviour, IDropHandler public void OnDrop(PointerEventData eventData) { + float Uix = GameObject.Find("Image").transform.position.x; + float Uiy = GameObject.Find("Image").transform.position.y; + float objx = GameObject.Find("bin").transform.position.x; float objy = GameObject.Find("bin").transform.position.y; @@ -20,5 +23,14 @@ public class midObj : MonoBehaviour, IDropHandler } + if (Uix + 888.2423/2 > Input.mousePosition.x && Uix - 888.2423/2 < Input.mousePosition.x && objy + 66.11261/2 > Input.mousePosition.y && Uiy - 66.11261/2 < Input.mousePosition.y) + { + Ui.protec = false; + } + else + { + Ui.protec = true; + } + } }