diff --git a/T3-Unity/Assets/Scenes/Map_Tests1.unity b/T3-Unity/Assets/Scenes/Map_Tests1.unity index 86732d4456a7754b62845267bfa9fa0248010d01..f21d74635481b03d83b91675eb7a6d2edc543000 100644 --- a/T3-Unity/Assets/Scenes/Map_Tests1.unity +++ b/T3-Unity/Assets/Scenes/Map_Tests1.unity @@ -240,7 +240,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2091460426} - m_RootOrder: 8 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} @@ -254,347 +254,33 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 52237254} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 22e95def6ff01ae4db51f6c6c8364c31, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 ---- !u!222 &52237257 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 52237254} - m_CullTransparentMesh: 0 ---- !u!1 &56089868 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 56089869} - - component: {fileID: 56089871} - - component: {fileID: 56089870} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &56089869 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 56089868} - 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: 1108485020} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &56089870 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 56089868} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: 'Moins - -' - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4281479730 - m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 - m_fontSize: 24 - m_fontSizeBase: 24 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_textAlignment: 514 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_firstOverflowCharacterIndex: -1 - m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_VertexBufferAutoSizeReduction: 1 - m_firstVisibleCharacter: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_textInfo: - textComponent: {fileID: 56089870} - characterCount: 6 - spriteCount: 0 - spaceCount: 1 - wordCount: 1 - linkCount: 0 - lineCount: 1 - pageCount: 1 - materialCount: 1 - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} - m_hasFontAssetChanged: 0 - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &56089871 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 56089868} - m_CullTransparentMesh: 0 ---- !u!1 &129478868 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 129478869} - - component: {fileID: 129478871} - - component: {fileID: 129478870} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &129478869 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 129478868} - 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: 1463677836} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &129478870 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 129478868} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: 'Plus - -' - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4281479730 - m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 - m_fontSize: 24 - m_fontSizeBase: 24 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_textAlignment: 514 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_firstOverflowCharacterIndex: -1 - m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_VertexBufferAutoSizeReduction: 1 - m_firstVisibleCharacter: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_textInfo: - textComponent: {fileID: 129478870} - characterCount: 5 - spriteCount: 0 - spaceCount: 1 - wordCount: 1 - linkCount: 0 - lineCount: 1 - pageCount: 1 - materialCount: 1 - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} - m_hasFontAssetChanged: 0 - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &129478871 + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 22e95def6ff01ae4db51f6c6c8364c31, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &52237257 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 129478868} + m_GameObject: {fileID: 52237254} m_CullTransparentMesh: 0 --- !u!1 &143949885 GameObject: @@ -1024,7 +710,7 @@ GameObject: - component: {fileID: 567138931} - component: {fileID: 567138933} m_Layer: 5 - m_Name: Image + m_Name: Fond_Ui m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1046,7 +732,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: 0.000030518, y: -71.4541} + m_AnchoredPosition: {x: 0, y: -71.45} m_SizeDelta: {x: 888.2423, y: 66.11261} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &567138931 @@ -1394,7 +1080,7 @@ RectTransform: - {fileID: 1427144197} - {fileID: 1031563741} m_Father: {fileID: 2091460426} - m_RootOrder: 5 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} @@ -1818,7 +1504,7 @@ RectTransform: m_Children: - {fileID: 1224263488} m_Father: {fileID: 2091460426} - m_RootOrder: 6 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} @@ -1941,11 +1627,11 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2091460426} - m_RootOrder: 12 + m_RootOrder: 6 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: -137.91, y: -117.60986} + m_AnchoredPosition: {x: -590.9, y: -112.26} m_SizeDelta: {x: 237.37445, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &755087653 @@ -2442,7 +2128,7 @@ RectTransform: - {fileID: 1511351837} - {fileID: 1633859665} m_Father: {fileID: 2091460426} - m_RootOrder: 4 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} @@ -2809,131 +2495,6 @@ Transform: m_Father: {fileID: 1160038181} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1108485019 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1108485020} - - component: {fileID: 1108485023} - - component: {fileID: 1108485022} - - component: {fileID: 1108485021} - m_Layer: 5 - m_Name: ButtonMinus - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1108485020 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1108485019} - 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: - - {fileID: 56089869} - m_Father: {fileID: 2091460426} - m_RootOrder: 2 - 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: -637, y: -117.34009} - m_SizeDelta: {x: 190.2688, y: 75.3916} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1108485021 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1108485019} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 1108485022} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 964767766} - m_MethodName: changeMinus - m_Mode: 5 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!114 &1108485022 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1108485019} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 ---- !u!222 &1108485023 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1108485019} - m_CullTransparentMesh: 0 --- !u!1 &1160038180 GameObject: m_ObjectHideFlags: 0 @@ -3313,12 +2874,12 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 2091460426} - m_RootOrder: 9 + 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} - m_AnchoredPosition: {x: -331, y: -46} - m_SizeDelta: {x: 70.45709, y: 82.51976} + m_AnchoredPosition: {x: -374, y: -71.45} + m_SizeDelta: {x: 111.21442, y: 117.69385} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1331080347 CanvasGroup: @@ -3371,12 +2932,12 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0, g: 0.4907095, b: 0.9622642, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 0} + m_Sprite: {fileID: 21300000, guid: 8d31d9f5613008d4e97a46db994c76d3, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -3691,131 +3252,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1440548237} m_CullTransparentMesh: 0 ---- !u!1 &1463677835 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1463677836} - - component: {fileID: 1463677839} - - component: {fileID: 1463677838} - - component: {fileID: 1463677837} - m_Layer: 5 - m_Name: ButtonPlus - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1463677836 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463677835} - 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: - - {fileID: 129478869} - m_Father: {fileID: 2091460426} - m_RootOrder: 3 - 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: -860, y: -117.34009} - m_SizeDelta: {x: 199.99994, y: 75.38324} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1463677837 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463677835} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 1463677838} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 964767768} - m_MethodName: changePlus - m_Mode: 5 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!114 &1463677838 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463677835} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 ---- !u!222 &1463677839 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463677835} - m_CullTransparentMesh: 0 --- !u!1 &1470260037 GameObject: m_ObjectHideFlags: 0 @@ -3849,12 +3285,12 @@ 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} - m_AnchoredPosition: {x: -241, y: -46} - m_SizeDelta: {x: 70.45709, y: 82.519775} + m_AnchoredPosition: {x: -239.1, y: -63.8} + m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1470260039 CanvasGroup: @@ -3889,7 +3325,7 @@ MonoBehaviour: m_GameObject: {fileID: 1470260037} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 113da985b8fd6a14693d1c93fa5af6b4, type: 3} + m_Script: {fileID: 11500000, guid: 380d8a9115a818141b41c663eb957408, type: 3} m_Name: m_EditorClassIdentifier: canvas: {fileID: 2091460429} @@ -3907,12 +3343,12 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.6792453, g: 0.11213954, b: 0.11213954, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 0} + m_Sprite: {fileID: 21300000, guid: bc9c6461c62937043bb7b31edc7164ca, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -4685,12 +4121,12 @@ 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} - m_AnchoredPosition: {x: -150, y: -46} - m_SizeDelta: {x: 70.45709, y: 82.519775} + m_AnchoredPosition: {x: -99.8, y: -63.8} + m_SizeDelta: {x: 111.2144, y: 117.6938} m_Pivot: {x: 0.5, y: 0.5} --- !u!225 &1896602725 CanvasGroup: @@ -4725,7 +4161,7 @@ MonoBehaviour: m_GameObject: {fileID: 1896602723} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 113da985b8fd6a14693d1c93fa5af6b4, type: 3} + m_Script: {fileID: 11500000, guid: 6eb5a4ed1248c2d4eb03f052c9db5eb4, type: 3} m_Name: m_EditorClassIdentifier: canvas: {fileID: 2091460429} @@ -4743,12 +4179,12 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.048593827, g: 0.7924528, b: 0.13211423, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 0} + m_Sprite: {fileID: 21300000, guid: 6a60629f4bb329744888c825d873f9cb, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -4797,7 +4233,7 @@ RectTransform: m_Children: - {fileID: 601173380} m_Father: {fileID: 2091460426} - m_RootOrder: 7 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} @@ -5039,17 +4475,15 @@ RectTransform: m_Children: - {fileID: 567138930} - {fileID: 1522705691} - - {fileID: 1108485020} - - {fileID: 1463677836} - {fileID: 956645373} - {fileID: 619556697} - {fileID: 729711191} - {fileID: 1953152065} + - {fileID: 755087652} - {fileID: 52237255} - {fileID: 1331080346} - {fileID: 1470260038} - {fileID: 1896602724} - - {fileID: 755087652} m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/T3-Unity/Assets/Scripts/IA/RunnersFactory.cs b/T3-Unity/Assets/Scripts/IA/RunnersFactory.cs index 476395e8ab3941682909db47049fbe2db3b3ba28..fe8b0a4cc862d3aa9e9aefa01a604f985c5c30e3 100644 --- a/T3-Unity/Assets/Scripts/IA/RunnersFactory.cs +++ b/T3-Unity/Assets/Scripts/IA/RunnersFactory.cs @@ -17,6 +17,7 @@ namespace Scripts.IA public List<GameObject> _listRunners; //<! "Insérer description de la variable" public float moyenneMotivation = 0; //<! "Insérer description de la variable" + // Champs privés private System.Random rdn; //<! "Insérer description de la variable" private static RunnersFactory instance; //<! "Insérer description de la variable" private AbstractMap _map; //<! "Insérer description de la variable" diff --git a/T3-Unity/Assets/Scripts/Routes/RouteTracer.cs b/T3-Unity/Assets/Scripts/Routes/RouteTracer.cs index 4328eac134cef3df6749512fee081e2c2a6aa983..aba4b66ca5bfe5a3c570525d1d8bddf7434fe7ef 100644 --- a/T3-Unity/Assets/Scripts/Routes/RouteTracer.cs +++ b/T3-Unity/Assets/Scripts/Routes/RouteTracer.cs @@ -61,9 +61,6 @@ GameObject.Find("Sportifs").GetComponent<RunnersFactory>().enabled = true; - - - } //! @param start Position du @b GameObject de départ. diff --git a/T3-Unity/Assets/Scripts/Waypoints/SpawnOnMap.cs b/T3-Unity/Assets/Scripts/Waypoints/SpawnOnMap.cs index 5f00eec92faef0760083c11bbaf8b4d2fb87bb52..e5d990643897f5e774995cb53607cacfc9c7de53 100644 --- a/T3-Unity/Assets/Scripts/Waypoints/SpawnOnMap.cs +++ b/T3-Unity/Assets/Scripts/Waypoints/SpawnOnMap.cs @@ -1,85 +1,78 @@ namespace Scripts.Waypoints { - using UnityEngine; - using Mapbox.Utils; - using Mapbox.Unity.Map; - using Mapbox.Unity.MeshGeneration.Factories; - using Mapbox.Unity.Utilities; - using System.Collections.Generic; + using UnityEngine; + using Mapbox.Utils; + using Mapbox.Unity.Map; + using Mapbox.Unity.MeshGeneration.Factories; + using Mapbox.Unity.Utilities; + using System.Collections.Generic; using Scripts.Routes; using Scripts.Map; + //! @authors MapBox + //! Wakestufou + //! @brief Fait apparaître des waypoints sur la Map. + //! @details Cette classe s'occupe de transformer une liste de coordonnées GPS en waypoints liés à la map. + //! De cette maniètre la caméra peut bouger, les waypoints resterons à leur position de base. + //! du placement des waypoints et tu tracé de la route. public class SpawnOnMap : MonoBehaviour - { - [SerializeField] - AbstractMap _map; + { + // Champs publiques + public List<GameObject> spawnedObjects; //!< Liste des waypoints placés. + public Transform parent; //!< Parent de la liste des waypoints placés. - [SerializeField] - [Geocode] - Vector2d[] _locations; - - [SerializeField] - float _spawnScale = 1f; - - [SerializeField] - float _spawnScaleStartEnd = 6f; - - [SerializeField] - GameObject _markerPrefab; - - [SerializeField] - GameObject _prefabDebut; - - [SerializeField] - GameObject _prefabFin; - - public List<GameObject> _spawnedObjects; - - public Transform parent; - private float _zoom; - private static SpawnOnMap instance; + // Champs privés + private float _zoom; //!< Valeur du zoom de la caméra sur la map. + private static SpawnOnMap _instance; //!< Instance actuelle. + [SerializeField] AbstractMap _map; //!< Map Google Street View. + [SerializeField] [Geocode] Vector2d[] _locations; //!< Liste des positions GPS des waypoints à placer. + [SerializeField] float _spawnScale = 1f; //!< Taille d'un waypoint de base. + [SerializeField] float _spawnScaleStartEnd = 6f; //!< Taille des waypoints de départ et d'arrivée. + [SerializeField] GameObject _markerPrefab; //!< Préfabriqué d'un waypoint de base. + [SerializeField] GameObject _startPrefab; //!< Préfabriqué du waypoint de départ. + [SerializeField] GameObject _endPrefab; //!< Préfabriqué du waypoint d'arrivée. + //! @brief Se lance au lancement du script. + //! @details Crée les waypoints sur la map à partir des coordonnées GPS. void Start() { - instance = this; + _instance = this; List<Vector2d> Waypoints = new List<Vector2d>(WaypointsFactory.getInstance().getWp()); _locations = new Vector2d[Waypoints.Count]; - _spawnedObjects = new List<GameObject>(); + spawnedObjects = new List<GameObject>(); for (int i = 0; i < _locations.Length; i++) { _locations[i] = Waypoints[i]; - var instances = Instantiate(_markerPrefab, parent); ; + var _instances = Instantiate(_markerPrefab, parent); ; if (i == 0) { - instances = Instantiate(_prefabDebut, parent); - instances.transform.localScale = new Vector3(_spawnScaleStartEnd, _spawnScaleStartEnd, _spawnScaleStartEnd); + _instances = Instantiate(_startPrefab, parent); + _instances.transform.localScale = new Vector3(_spawnScaleStartEnd, _spawnScaleStartEnd, _spawnScaleStartEnd); } else if (i == _locations.Length - 1) { - instances = Instantiate(_prefabFin, parent); - instances.transform.localScale = new Vector3(_spawnScaleStartEnd, _spawnScaleStartEnd, _spawnScaleStartEnd); + _instances = Instantiate(_endPrefab, parent); + _instances.transform.localScale = new Vector3(_spawnScaleStartEnd, _spawnScaleStartEnd, _spawnScaleStartEnd); } else { - instances.transform.localScale = new Vector3(_spawnScale, _spawnScale, _spawnScale); + _instances.transform.localScale = new Vector3(_spawnScale, _spawnScale, _spawnScale); } - - instances.transform.localPosition = _map.GeoToWorldPosition(_locations[i], true); - _spawnedObjects.Add(instances); + + _instances.transform.localPosition = _map.GeoToWorldPosition(_locations[i], true); + spawnedObjects.Add(_instances); } - //GameObject.Find("Map").GetComponent<QuadTreeCameraMovement>().enabled = true; - //_cam = GameObject.Find("GameManager").GetComponent<QuadTreeCameraMovement>(); - //_cam.enabled = true; - //_cam.minZoom = 0; _zoom = _map.Zoom; } + //! @brief Se répète toutes les 14ms (temps par défaut dans Unity). + //! @details Met à jour les waypoints de la map afin qu'ils gardent leur place réelle et non leur position Unity. private void Update() { - int count = _spawnedObjects.Count; + int count = spawnedObjects.Count; for (int i = 0; i < count; i++) { - var spawnedObject = _spawnedObjects[i]; + var spawnedObject = spawnedObjects[i]; var location = _locations[i]; spawnedObject.transform.localPosition = _map.GeoToWorldPosition(location, true); spawnedObject.transform.localScale = new Vector3(_spawnScale, _spawnScale, _spawnScale); @@ -88,12 +81,11 @@ if (VerifVisible()) { GameObject.Find("GameManager").GetComponent<RouteTracer>().enabled = true; - //this.enabled = false; - } else if (_zoom <= 2) + } + else if (_zoom <= 2) { GameObject.Find("GameManager").GetComponent<RouteTracer>().enabled = true; - //this.enabled = false; - } + } else { _zoom -= 0.25f; @@ -101,24 +93,32 @@ } } + //! @brief Test la visibilité des waypoints. + //! @details Si un waypoints n'est dans le champs de vision de la caméra. + //! @return @e bool Si un waypoint n'est pas visible renvoie @b false, sinon renvoie @b true private bool VerifVisible() { bool verif = true; - for (int i = 0; i<_spawnedObjects.Count; i++) + for (int i = 0; i < spawnedObjects.Count; i++) { - if (!_spawnedObjects[i].GetComponent<Renderer>().isVisible) verif = false; + if (!spawnedObjects[i].GetComponent<Renderer>().isVisible) verif = false; } return verif; } + //! @brief Récupère les objets crées. + //! @return @e List<GameObject> Liste des waypoints qui ont été placés. public List<GameObject> getSpawnedObject() { - return _spawnedObjects; + return spawnedObjects; } + //! @brief Récupère l'instance de Waypoints.SpawnOnMap + //! @details Récupère l'instance du script actuel afin de respecter un patterne @b singleton. + //! @return @e SpawnOnMap Instance actuelle. public static SpawnOnMap getInstance() { - return instance; + return _instance; } } } \ No newline at end of file