diff --git a/T3-Unity/Assets/Mapbox/Examples/2_AstronautGame/AstronautGame/Road/RoadMaterial.mat b/T3-Unity/Assets/Mapbox/Examples/2_AstronautGame/AstronautGame/Road/RoadMaterial.mat index a7cc2131906d04657f06012d7f73c465b597d506..d7ed5a9d6f220c61e8907a7ce6b0e3aa2845319b 100644 --- a/T3-Unity/Assets/Mapbox/Examples/2_AstronautGame/AstronautGame/Road/RoadMaterial.mat +++ b/T3-Unity/Assets/Mapbox/Examples/2_AstronautGame/AstronautGame/Road/RoadMaterial.mat @@ -47,7 +47,7 @@ Material: - _MainTex: m_Texture: {fileID: 2800000, guid: 8d97105b69182cd48a279b7135b33a47, type: 3} m_Scale: {x: 0.05, y: 1} - m_Offset: {x: -8.908975, y: 0.2} + m_Offset: {x: -0.5135814, y: 0.2} - _MetallicGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} diff --git a/T3-Unity/Assets/Prefabs/Waypoint.prefab b/T3-Unity/Assets/Prefabs/Waypoint.prefab index b74ca2c8fcdadd2559b729d03fc96c40b57ec18a..623d10730f707c1b6bac4bd5efca008adc3670ad 100644 --- a/T3-Unity/Assets/Prefabs/Waypoint.prefab +++ b/T3-Unity/Assets/Prefabs/Waypoint.prefab @@ -25,7 +25,7 @@ Transform: m_GameObject: {fileID: 901362092215755285} 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_LocalScale: {x: 2, y: 1, z: 2} m_Children: - {fileID: 901362092661596065} - {fileID: 8516574415075833833} diff --git a/T3-Unity/Assets/Scenes/Map_Tests.unity b/T3-Unity/Assets/Scenes/Map_Tests.unity index 5321d587920dc71a0544fef2cb7b854f22e81b09..8a3ab59cf6d980e3ba18116656504a95e481c485 100644 --- a/T3-Unity/Assets/Scenes/Map_Tests.unity +++ b/T3-Unity/Assets/Scenes/Map_Tests.unity @@ -143,13 +143,14 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 2095464625} + - {fileID: 1440367857} m_Father: {fileID: 2056313313} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 250, y: 30} + m_SizeDelta: {x: 750, y: 175} m_Pivot: {x: 1, y: 1} --- !u!114 &32484157 MonoBehaviour: @@ -302,7 +303,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 449615647} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 450, y: 144.95001, z: 0} + m_LocalPosition: {x: 112.96, y: 100, z: 57.735} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 534669905} @@ -358,7 +359,7 @@ Camera: width: 1 height: 1 near clip plane: 0.3 - far clip plane: 1000 + far clip plane: 100.2 field of view: 60 orthographic: 0 orthographic size: 5 @@ -385,7 +386,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 534669902} m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} - m_LocalPosition: {x: -450, y: -34.950012, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 449615648} @@ -448,11 +449,11 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 12800000, guid: 218956a5c2a6e42d6a60afccf80b002b, type: 3} - m_FontSize: 10 + m_FontSize: 35 m_FontStyle: 2 m_BestFit: 1 - m_MinSize: 8 - m_MaxSize: 10 + m_MinSize: 0 + m_MaxSize: 35 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 0 @@ -525,7 +526,7 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 12800000, guid: bd1ea67ca2b5742d1a24fcbdc17c55e1, type: 3} - m_FontSize: 12 + m_FontSize: 30 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 1 @@ -558,15 +559,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4867834046800562, guid: e6b749c6d877f4c19a5a5c3c0783d53b, type: 3} propertyPath: m_LocalPosition.x - value: 8.337277 + value: 112.96 objectReference: {fileID: 0} - target: {fileID: 4867834046800562, guid: e6b749c6d877f4c19a5a5c3c0783d53b, type: 3} propertyPath: m_LocalPosition.y - value: 4.4933844 + value: 0 objectReference: {fileID: 0} - target: {fileID: 4867834046800562, guid: e6b749c6d877f4c19a5a5c3c0783d53b, type: 3} propertyPath: m_LocalPosition.z - value: 5.9584603 + value: 57.735 objectReference: {fileID: 0} - target: {fileID: 4867834046800562, guid: e6b749c6d877f4c19a5a5c3c0783d53b, type: 3} propertyPath: m_LocalRotation.x @@ -776,7 +777,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _panSpeed: 1 - _zoomSpeed: 1 + _zoomSpeed: 0.25 _referenceCamera: {fileID: 534669904} _mapManager: {fileID: 703254553} _useDegreeMethod: 0 @@ -805,19 +806,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _map: {fileID: 703254553} - _locationStrings: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - _spawnScale: 2 - _markerPrefab: {fileID: 901362092215755285, guid: 18761a72aa6233c4bb4bd29dd401981e, + _locationStrings: [] + _spawnScale: 100 + _markerPrefab: {fileID: 2852985419580513409, guid: d0fa0a2d49f4ee44ebe2ec530d3cdf33, type: 3} --- !u!1 &758898508 GameObject: @@ -885,6 +876,55 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &817057766 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 817057768} + - component: {fileID: 817057767} + m_Layer: 0 + m_Name: GameManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &817057767 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 817057766} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5e691edd9c25c6c49945c730794c5f03, type: 3} + m_Name: + m_EditorClassIdentifier: + waypoints: + - {fileID: 2852985419580513409, guid: d0fa0a2d49f4ee44ebe2ec530d3cdf33, type: 3} + - {fileID: 5106668611982552037, guid: 6a798f905f6b7dd4ea45b512de8e4537, type: 3} + map: {fileID: 703254553} + canvas: {fileID: 2056313312} + locked: 0 +--- !u!4 &817057768 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 817057766} + 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: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1255026297 GameObject: m_ObjectHideFlags: 0 @@ -1044,6 +1084,131 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9bce9ff37f5964623a657f4003af54f2, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &1440367856 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1440367857} + - component: {fileID: 1440367860} + - component: {fileID: 1440367859} + - component: {fileID: 1440367858} + m_Layer: 5 + m_Name: ValidateButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1440367857 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1440367856} + 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: 1756448749} + m_Father: {fileID: 32484156} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1440367858 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1440367856} + 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: 1440367859} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 817057767} + m_MethodName: lockMovement + m_Mode: 1 + 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 &1440367859 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1440367856} + 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 &1440367860 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1440367856} + m_CullTransparentMesh: 0 --- !u!1 &1440548237 GameObject: m_ObjectHideFlags: 0 @@ -1101,11 +1266,11 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 12800000, guid: 218956a5c2a6e42d6a60afccf80b002b, type: 3} - m_FontSize: 10 + m_FontSize: 35 m_FontStyle: 0 m_BestFit: 1 - m_MinSize: 8 - m_MaxSize: 10 + m_MinSize: 1 + m_MaxSize: 35 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 0 @@ -1121,6 +1286,161 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1440548237} m_CullTransparentMesh: 0 +--- !u!1 &1756448748 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1756448749} + - component: {fileID: 1756448751} + - component: {fileID: 1756448750} + 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 &1756448749 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1756448748} + 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: 1440367857} + 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 &1756448750 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1756448748} + 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: Valider l'emplacement + 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: 1756448750} + characterCount: 21 + spriteCount: 0 + spaceCount: 1 + wordCount: 2 + 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 &1756448751 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1756448748} + m_CullTransparentMesh: 0 --- !u!1 &2056313308 GameObject: m_ObjectHideFlags: 0 @@ -1154,7 +1474,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _player: {fileID: 449615647} - _playerStartPos: {x: 0, y: 0, z: 0} + _playerStartPos: {x: 112.96, y: 100, z: 57.735} _forwardGeocoder: {fileID: 1255026302} _zoomSlider: {fileID: 0} --- !u!114 &2056313310 @@ -1189,7 +1509,7 @@ MonoBehaviour: m_UiScaleMode: 1 m_ReferencePixelsPerUnit: 100 m_ScaleFactor: 1 - m_ReferenceResolution: {x: 400, y: 600} + m_ReferenceResolution: {x: 1920, y: 1080} m_ScreenMatchMode: 0 m_MatchWidthOrHeight: 0.5 m_PhysicalUnit: 3 @@ -1213,7 +1533,7 @@ Canvas: m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 + m_AdditionalShaderChannelsFlag: 25 m_SortingLayerID: 0 m_SortingOrder: 1 m_TargetDisplay: 0 diff --git a/T3-Unity/Assets/Scripts/ArrowsButton.cs b/T3-Unity/Assets/Scripts/ArrowsButton.cs deleted file mode 100644 index 350226320580da0ad5de6ee75b6bfd6fb3afc8f4..0000000000000000000000000000000000000000 --- a/T3-Unity/Assets/Scripts/ArrowsButton.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -// UI -using UnityEngine.UI; - -public class ArrowsButton : MonoBehaviour -{ - private Button arrow; - private GameManager gameManager; - private RoomManager roomManager; - - // -1 pour gauche/haut, +1 pour droite/bas - public int direction; - // true pour utiliser en mode flêches, false pour les changements de salle - public bool arrowsOrNProom; - - // Start is called before the first frame update - void Start() - { - gameManager = GameObject.Find("GameManager").GetComponent<GameManager>(); - roomManager = gameManager.room.GetComponent<RoomManager>(); - - arrow = GetComponent<Button>(); - - if (arrowsOrNProom) - { - arrow.onClick.AddListener(Arrow); - } - else - { - arrow.onClick.AddListener(NProom); - } - - } - - // Update is called once per frame - void Update() - { - - } - - // Action lors du clique sur une flêche - public void Arrow() - { - int viewIndex = roomManager.viewIndex; - roomManager.viewIndex = direction; - gameManager.updateID(roomManager.actualRoom); - } - - // Action du clique sur un changement de pièce - public void NProom() - { - int roomIndex = roomManager.roomIndex; - roomManager.roomIndex = direction; - gameManager.updateID(roomManager.actualRoom, roomManager.actualRoomColor); - } -} diff --git a/T3-Unity/Assets/Scripts/ArrowsButton.cs.meta b/T3-Unity/Assets/Scripts/ArrowsButton.cs.meta deleted file mode 100644 index 9e01b70392ff613cde3302191da0d00a250035ed..0000000000000000000000000000000000000000 --- a/T3-Unity/Assets/Scripts/ArrowsButton.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 23458ba8043c1354898cc609f72d0f94 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/T3-Unity/Assets/Scripts/GameManager.cs b/T3-Unity/Assets/Scripts/GameManager.cs index e19d20950cef8dabed60c4651eae32440310597e..9b7da6133be6b9dc5c8016a087edf6dce321f95e 100644 --- a/T3-Unity/Assets/Scripts/GameManager.cs +++ b/T3-Unity/Assets/Scripts/GameManager.cs @@ -1,17 +1,16 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; - -// Addon pour les textes améliorés -using TMPro; - -// Gestion des scenes -using UnityEngine.SceneManagement; +using Mapbox.Unity.Map; +using Mapbox.Examples; public class GameManager : MonoBehaviour { - private RoomManager _roomManager; + public GameObject[] waypoints; + public AbstractMap map; + public Canvas canvas; +<<<<<<< HEAD public TextMeshProUGUI textMeshID; public GameObject room; public static float motiv; @@ -25,25 +24,42 @@ public class GameManager : MonoBehaviour _roomManager = this.room.GetComponent<RoomManager>(); updateID(_roomManager.actualRoom, _roomManager.actualRoomColor ); +======= + private bool locked = false; + private Vector3 offset; + private Plane _yPlane; + + // Start is called before the first frame update + void Start() + { + _yPlane = new Plane(Vector3.up, Vector3.zero); +>>>>>>> 9b79b293318bccaeaaace53c684466b45bb7930a } // Update is called once per frame void Update() { + if (Input.GetKeyDown(KeyCode.Mouse0) && locked) + { + Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); +<<<<<<< HEAD +======= + float enter = 0.0f; + if (_yPlane.Raycast(ray, out enter)) + { + Instantiate(waypoints[0], ray.GetPoint(enter), new Quaternion(0, 0, 0, 0)); + } + } +>>>>>>> 9b79b293318bccaeaaace53c684466b45bb7930a } - // Update textMeshID - public void updateID(string newID) - { - textMeshID.text = "ID : " + newID; - } - - // Update textMeshID + Room - public void updateID(string newID, Color roomColor) + // Lock la map + public void lockMovement() { - textMeshID.text = "ID : " + newID; - room.GetComponent<Renderer>().material.color = roomColor; + map.GetComponent<QuadTreeCameraMovement>().enabled = false; + canvas.GetComponentInChildren<Transform>().gameObject.SetActive(false); + locked = true; } } diff --git a/T3-Unity/Assets/Scripts/RoomManager.cs b/T3-Unity/Assets/Scripts/RoomManager.cs deleted file mode 100644 index 5ad4b2b75977e9306bf47da74dfcfa9c0984b401..0000000000000000000000000000000000000000 --- a/T3-Unity/Assets/Scripts/RoomManager.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class RoomManager : MonoBehaviour -{ - - private int _viewIndex = 1; - private int _roomIndex = 0; - private string[][] _rooms = { - new string[] {"A2","A1","A3" }, - new string[] {"B1"}, - new string[] {"C1", "C2", "C3"} - }; - private Color[] _roomsColors = { Color.red, Color.green, Color.blue }; - - public int viewIndex - { - get { return _viewIndex; } - set - { - if (0 < _viewIndex && _viewIndex < _rooms[_roomIndex].Length - 1) - _viewIndex += value; - else if (0 < _viewIndex && value < 0) - _viewIndex += value; - else if (_viewIndex < _rooms[_roomIndex].Length - 1 && value > 0) - _viewIndex += value; - } - } - - public int roomIndex - { - get { return _roomIndex; } - set - { - if (0 < _roomIndex && _roomIndex < _rooms.Length - 1) - _roomIndex = _roomIndex + value; - else if (0 < _roomIndex && value < 0) - _roomIndex += value; - else if (_roomIndex < _rooms.Length - 1 && value > 0) - _roomIndex += value; - - if( _rooms[_roomIndex].Length - 1 < _viewIndex) - _viewIndex = _rooms[_roomIndex].Length - 1; - } - } - - public string actualRoom - { - get { return _rooms[_roomIndex][_viewIndex]; } - } - - public Color actualRoomColor - { - get - { - return _roomsColors[_roomIndex]; - } - } -} diff --git a/T3-Unity/Assets/Scripts/RoomManager.cs.meta b/T3-Unity/Assets/Scripts/RoomManager.cs.meta deleted file mode 100644 index f6b262caf1c9dafc2507264bea32079a47f50e78..0000000000000000000000000000000000000000 --- a/T3-Unity/Assets/Scripts/RoomManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8452f8bd090cf944487aeb833adf5c41 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: