diff --git a/Assets/Resources/Prefabs/Modulok/module1.prefab b/Assets/Resources/Prefabs/Modulok/module1.prefab index 3429192..353ba3b 100644 --- a/Assets/Resources/Prefabs/Modulok/module1.prefab +++ b/Assets/Resources/Prefabs/Modulok/module1.prefab @@ -536,6 +536,7 @@ GameObject: m_Component: - component: {fileID: 4168203924951896375} - component: {fileID: 6681264605721016949} + - component: {fileID: 5967127427308065838} m_Layer: 0 m_Name: module1 m_TagString: Ground @@ -575,6 +576,7 @@ Transform: - {fileID: 1919544710816317602} - {fileID: 2121889610552739742} - {fileID: 1727239170062321013} + - {fileID: 2374668396301742108} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} @@ -594,6 +596,19 @@ Rigidbody: m_Interpolate: 0 m_Constraints: 126 m_CollisionDetection: 0 +--- !u!65 &5967127427308065838 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3644467415503719309} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} --- !u!1 &3881739575044523192 GameObject: m_ObjectHideFlags: 0 @@ -984,6 +999,133 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 2, y: 1.9999998, z: 1.9999998} m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &6014391501904759351 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2374668396301742108} + - component: {fileID: 4953821586854379566} + - component: {fileID: 1859100177718195063} + - component: {fileID: 5104516478240326965} + - component: {fileID: 3006575065569763477} + - component: {fileID: 5296717708302524955} + m_Layer: 0 + m_Name: ScoreTrigger + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2374668396301742108 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6014391501904759351} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 17.86, y: 0, z: 0.000054083} + m_LocalScale: {x: 1, y: 27.102499, z: 13.825} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4168203924951896375} + m_RootOrder: 20 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &4953821586854379566 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6014391501904759351} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1859100177718195063 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6014391501904759351} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &5104516478240326965 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6014391501904759351} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1.0000005, y: 1, z: 1.0000005} + m_Center: {x: -2.842171e-13, y: 0, z: -0.000007629398} +--- !u!114 &3006575065569763477 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6014391501904759351} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a50eb662440e8354e8a596fbc79887a4, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!54 &5296717708302524955 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6014391501904759351} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 126 + m_CollisionDetection: 0 --- !u!1 &6313642264481077795 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/Prefabs/Modulok/module2.prefab b/Assets/Resources/Prefabs/Modulok/module2.prefab index abbffac..2419cad 100644 --- a/Assets/Resources/Prefabs/Modulok/module2.prefab +++ b/Assets/Resources/Prefabs/Modulok/module2.prefab @@ -205,7 +205,7 @@ GameObject: - component: {fileID: 3525221709751892539} - component: {fileID: 6340804965400565202} - component: {fileID: 625001855245180367} - - component: {fileID: 3525221709751892538} + - component: {fileID: 5392026725350875292} m_Layer: 0 m_Name: Obstacle m_TagString: Obstacle @@ -279,8 +279,8 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &3525221709751892538 -BoxCollider: +--- !u!64 &5392026725350875292 +MeshCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -289,9 +289,10 @@ BoxCollider: m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1.497872, y: 6.008606, z: 1.9999996} - m_Center: {x: 0.251064, y: -2.0043032, z: -2.2786292e-13} + serializedVersion: 4 + m_Convex: 1 + m_CookingOptions: 30 + m_Mesh: {fileID: -1550514412580984892, guid: b13a5fc417c3db84ebd8db85da99b163, type: 3} --- !u!1 &1200158165763589676 GameObject: m_ObjectHideFlags: 0 @@ -320,8 +321,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1200158165763589676} m_LocalRotation: {x: -0.00000005960463, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.02, y: 0, z: 0} - m_LocalScale: {x: 1, y: 0.94059, z: 0.97411} + m_LocalPosition: {x: 0.9726, y: -1e-15, z: 9.0952e-10} + m_LocalScale: {x: 0.0474, y: 0.895959, z: 0.90942913} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 4448842801143368685} @@ -528,8 +529,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 4506123922091270092} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.006, y: 0, z: 0} - m_LocalScale: {x: 1, y: 0.94599, z: 0.99313} + m_LocalPosition: {x: 0.9559, y: -0, z: 9.0952e-10} + m_LocalScale: {x: 0.0501, y: 0.9095316, z: 0.9290036} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 5043219669366478707} @@ -610,6 +611,133 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c504cad2318bb1e33bb50a99fd60a73f, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &5600835892423220165 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4682925411692500118} + - component: {fileID: 6153748427033252365} + - component: {fileID: 1009944063591014388} + - component: {fileID: 58547284152227228} + - component: {fileID: 8554184737637652021} + - component: {fileID: 4214120632109647797} + m_Layer: 0 + m_Name: Score Trigger + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4682925411692500118 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5600835892423220165} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 18.76, y: 0, z: 0.000091326} + m_LocalScale: {x: 1, y: 15.522, z: 12.204} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8769601115213192681} + m_RootOrder: 20 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &6153748427033252365 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5600835892423220165} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1009944063591014388 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5600835892423220165} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &58547284152227228 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5600835892423220165} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1.0000005, y: 1, z: 1.0000005} + m_Center: {x: 1.1368684e-13, y: 0, z: -0.000015258796} +--- !u!114 &8554184737637652021 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5600835892423220165} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a50eb662440e8354e8a596fbc79887a4, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!54 &4214120632109647797 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5600835892423220165} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 126 + m_CollisionDetection: 0 --- !u!1 &5683145144490760307 GameObject: m_ObjectHideFlags: 0 @@ -638,8 +766,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5683145144490760307} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.01, y: -0, z: -0} - m_LocalScale: {x: 1, y: 0.93897, z: 0.91119} + m_LocalPosition: {x: 0.9498, y: -0, z: 0} + m_LocalScale: {x: 0.0602, y: 0.8681247, z: 0.80550104} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 5284789182228035052} @@ -731,8 +859,8 @@ GameObject: - component: {fileID: 8836537173982762389} - component: {fileID: 8914935607028962075} - component: {fileID: 8312194036318716396} - - component: {fileID: 2076852316269774631} - component: {fileID: 3294861903362003258} + - component: {fileID: 6451716690511887172} m_Layer: 0 m_Name: Obstacle (1) m_TagString: DeathCollider @@ -748,7 +876,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6730807522616562707} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.039, y: 0, z: 0.05} + m_LocalPosition: {x: -0.005, y: 0.02, z: -0.03} m_LocalScale: {x: 1, y: 1, z: 0.78626555} m_ConstrainProportionsScale: 0 m_Children: [] @@ -805,19 +933,6 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &2076852316269774631 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6730807522616562707} - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1.497872, y: 6.008606, z: 1.9999996} - m_Center: {x: 0.251064, y: -2.0043032, z: -2.2786292e-13} --- !u!114 &3294861903362003258 MonoBehaviour: m_ObjectHideFlags: 0 @@ -830,6 +945,20 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c504cad2318bb1e33bb50a99fd60a73f, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!64 &6451716690511887172 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6730807522616562707} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 1 + m_CookingOptions: 30 + m_Mesh: {fileID: -1550514412580984892, guid: b13a5fc417c3db84ebd8db85da99b163, type: 3} --- !u!1 &6877566407207581631 GameObject: m_ObjectHideFlags: 0 @@ -1134,6 +1263,7 @@ GameObject: m_Component: - component: {fileID: 8769601115213192681} - component: {fileID: 1707776448831154223} + - component: {fileID: 6503581861110507386} m_Layer: 0 m_Name: module2 m_TagString: Ground @@ -1173,6 +1303,7 @@ Transform: - {fileID: 3843683774402157700} - {fileID: 1169722440257732330} - {fileID: 7700384264418905066} + - {fileID: 4682925411692500118} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} @@ -1192,6 +1323,19 @@ Rigidbody: m_Interpolate: 0 m_Constraints: 126 m_CollisionDetection: 0 +--- !u!65 &6503581861110507386 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8284425857235584851} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} --- !u!1 &8481750556020934758 GameObject: m_ObjectHideFlags: 0 @@ -1317,8 +1461,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8496194706872620336} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.012, y: -0, z: -0} - m_LocalScale: {x: 1, y: 0.92866, z: 0.89761} + m_LocalPosition: {x: 0.9785, y: -0, z: 0} + m_LocalScale: {x: 0.0335, y: 0.8465352, z: 0.8088723} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1200888796326199778} diff --git a/Assets/Scenes/EndlessRunnerTest.unity b/Assets/Scenes/EndlessRunnerTest.unity index bd14344..211637b 100644 --- a/Assets/Scenes/EndlessRunnerTest.unity +++ b/Assets/Scenes/EndlessRunnerTest.unity @@ -387,8 +387,8 @@ RectTransform: 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: -103.16, y: 698} - m_SizeDelta: {x: 506.3254, y: 168.2041} + m_AnchoredPosition: {x: -221, y: 628} + m_SizeDelta: {x: 250, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &788008818 MonoBehaviour: @@ -410,7 +410,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 'Coins: 0' + m_text: 'Coins: ' m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -437,7 +437,7 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 100 + m_fontSize: 80.55 m_fontSizeBase: 60 m_fontWeight: 400 m_enableAutoSizing: 1 @@ -487,6 +487,141 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 788008816} m_CullTransparentMesh: 1 +--- !u!1 &834582558 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 834582559} + - component: {fileID: 834582561} + - component: {fileID: 834582560} + m_Layer: 5 + m_Name: Score + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &834582559 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 834582558} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 871711471} + m_RootOrder: 5 + 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: -227, y: 541} + m_SizeDelta: {x: 250, y: 90} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &834582560 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 834582558} + 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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 'Score: ' + 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: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, 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_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 80.55 + m_fontSizeBase: 60 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 20 + m_fontSizeMax: 100 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + 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_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &834582561 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 834582558} + m_CullTransparentMesh: 1 --- !u!1 &871711467 GameObject: m_ObjectHideFlags: 0 @@ -584,6 +719,7 @@ RectTransform: - {fileID: 284201299} - {fileID: 2069815690} - {fileID: 788008817} + - {fileID: 834582559} m_Father: {fileID: 0} m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -790,6 +926,7 @@ GameObject: - component: {fileID: 1201779184} - component: {fileID: 1201779185} - component: {fileID: 1201779186} + - component: {fileID: 1201779187} m_Layer: 0 m_Name: Manager m_TagString: Untagged @@ -889,6 +1026,20 @@ MonoBehaviour: m_EditorClassIdentifier: fpsText: {fileID: 1572233531} _hudRefreshRate: 1 +--- !u!114 &1201779187 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1201779180} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d858282f94188744f80e5d0e2883a3a1, type: 3} + m_Name: + m_EditorClassIdentifier: + score: 0 + scoreUI: {fileID: 834582560} --- !u!1 &1219467652 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/CoinCounter.cs b/Assets/Scripts/CoinCounter.cs index 0164d89..e018758 100644 --- a/Assets/Scripts/CoinCounter.cs +++ b/Assets/Scripts/CoinCounter.cs @@ -2,28 +2,49 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; +using System.IO; +using System.Text; public class CoinCounter : MonoBehaviour { - public ulong coin = 0; //szedje le db-bol a playerhez a coint + public ulong coin; //szedje le db-bol a playerhez a coint public TMP_Text coinCounterUI; + private string path; + private StreamWriter writer; + private StreamReader reader; - private DatabaseData dd; + private void Awake() { + path = Application.persistentDataPath + "/coins.txt"; - //get player coin at startup based on username - private void Awake() { - dd = FindObjectOfType(); + if(!File.Exists(path)){ //ha nincs meg ilyen fajl hozza letre + writer = new StreamWriter(path, false, Encoding.Default); + writer.Write(0); + writer.Close(); + } - //dd.GetCoinData("Playmaker1210"); + reader = new StreamReader(path); + coin = ulong.Parse(reader.ReadLine()); + reader.Close(); + Debug.Log("Coins at start: " + coin); + + coinCounterUI.text = "Coins: " + coin.ToString(); } public void AddCoin(ulong number){ coin += number; coinCounterUI.text = "Coins: " + coin.ToString(); + + writer = new StreamWriter(path, false, Encoding.Default); + writer.Write(coin); + writer.Close(); } public void RemoveCoin(ulong number){ coin -= number; //coinCounterUI.text = "Coins: " + coin.ToString(); + + writer = new StreamWriter(path, false, Encoding.Default); + writer.Write(coin); + writer.Close(); } } diff --git a/Assets/Scripts/GroundController.cs b/Assets/Scripts/GroundController.cs index 92be471..72589e1 100644 --- a/Assets/Scripts/GroundController.cs +++ b/Assets/Scripts/GroundController.cs @@ -13,6 +13,7 @@ public class GroundController : MonoBehaviour private void Awake() { //cs = FindObjectOfType(); + //Loading modules loadFrom = LoadPrefabs("Prefabs/Modulok"); sideObjects = LoadPrefabs("Models/World Objects/World 1"); @@ -37,11 +38,11 @@ public class GroundController : MonoBehaviour } //uj ground letrehozas - if(ground[ground.Length-1].transform.position.z <= 80){ + if(ground[ground.Length-1].transform.position.z <= 120){ CreateNewGround(); } - //ellenorzi hogy torolheto e az object + //ellenorzi hogy torolheto e az object || mar nem szukseges mert van egy trigger box /*foreach (var item in ground){ if(CheckGroundToDestroy(item)){ Destroy(item); @@ -82,7 +83,7 @@ public class GroundController : MonoBehaviour private void CreateNewGround(){ int random = UnityEngine.Random.Range(0, loadFrom.Length); - //ketto modullal elobb tolt be, annak az iranyanak megfeleloen, +80 a ket modull hossza + //egy modullal elobb tolt be, annak az iranyanak megfeleloen, +80 a ket modull hossza Instantiate(loadFrom[random], new Vector3(0,0, ground[ground.Length-1].transform.position.z + 40), ground[ground.Length-1].transform.rotation); } } \ No newline at end of file diff --git a/Assets/Scripts/Score.cs b/Assets/Scripts/Score.cs new file mode 100644 index 0000000..5bb0cd4 --- /dev/null +++ b/Assets/Scripts/Score.cs @@ -0,0 +1,20 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using TMPro; + +public class Score : MonoBehaviour +{ + public ulong score; + public TMP_Text scoreUI; + + private void Awake() { + score = 0; + scoreUI.text = "Score: " + score.ToString(); + } + + public void addScore(ulong number){ + score += number; + scoreUI.text = "Score: " + score.ToString(); + } +} \ No newline at end of file diff --git a/Assets/Scripts/Score.cs.meta b/Assets/Scripts/Score.cs.meta new file mode 100644 index 0000000..6327794 --- /dev/null +++ b/Assets/Scripts/Score.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d858282f94188744f80e5d0e2883a3a1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ScoreTrigger.cs b/Assets/Scripts/ScoreTrigger.cs new file mode 100644 index 0000000..44f7b89 --- /dev/null +++ b/Assets/Scripts/ScoreTrigger.cs @@ -0,0 +1,17 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ScoreTrigger : MonoBehaviour +{ + private Score score; + private void Awake() { + score = FindObjectOfType(); + } + private void OnTriggerEnter(Collider other) { + Debug.Log("score triggered"); + if(other.gameObject.tag == "Player"){ + score.addScore(1); + } + } +} diff --git a/Assets/Scripts/ScoreTrigger.cs.meta b/Assets/Scripts/ScoreTrigger.cs.meta new file mode 100644 index 0000000..8c249d1 --- /dev/null +++ b/Assets/Scripts/ScoreTrigger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a50eb662440e8354e8a596fbc79887a4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UserSettings/Layouts/default-2021.dwlt b/UserSettings/Layouts/default-2021.dwlt index 4931084..b39b9b4 100644 --- a/UserSettings/Layouts/default-2021.dwlt +++ b/UserSettings/Layouts/default-2021.dwlt @@ -39,12 +39,12 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 933 + x: 871 y: 0 - width: 484 + width: 456 height: 629 - m_MinSize: {x: 202, y: 221} - m_MaxSize: {x: 4002, y: 4021} + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} m_ActualView: {fileID: 18} m_Panes: - {fileID: 18} @@ -145,7 +145,7 @@ MonoBehaviour: m_MinSize: {x: 400, y: 200} m_MaxSize: {x: 32384, y: 16192} vertical: 0 - controlID: 65 + controlID: 16 --- !u!114 &7 MonoBehaviour: m_ObjectHideFlags: 52 @@ -165,12 +165,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1417 + width: 1327 height: 947 m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 1 - controlID: 66 + controlID: 17 --- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 @@ -191,12 +191,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1417 + width: 1327 height: 629 m_MinSize: {x: 300, y: 100} m_MaxSize: {x: 24288, y: 8096} vertical: 0 - controlID: 67 + controlID: 18 --- !u!114 &9 MonoBehaviour: m_ObjectHideFlags: 52 @@ -214,10 +214,10 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 197 + width: 186 height: 629 - m_MinSize: {x: 201, y: 221} - m_MaxSize: {x: 4001, y: 4021} + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} m_ActualView: {fileID: 13} m_Panes: - {fileID: 13} @@ -238,9 +238,9 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 197 + x: 186 y: 0 - width: 736 + width: 685 height: 629 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 4000, y: 4000} @@ -266,7 +266,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 629 - width: 1417 + width: 1327 height: 318 m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} @@ -290,9 +290,9 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 1417 + x: 1327 y: 0 - width: 503 + width: 593 height: 947 m_MinSize: {x: 276, y: 71} m_MaxSize: {x: 4001, y: 4021} @@ -324,7 +324,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 73 - width: 196 + width: 185 height: 608 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -335,7 +335,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: ecf2ffff54f5ffff34fbffff20670000 + m_ExpandedIDs: 4c36ffffe267ffff4068ffff466effffd27fffff3080ffff3886ffffbef8ffff34fbffffa2f2000054f40000d65b0100 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -379,9 +379,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 197 + x: 186 y: 73 - width: 734 + width: 683 height: 608 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -617,9 +617,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: 579.58923, y: 1254.9442, z: 8.661779} + m_Target: {x: 646.07245, y: 1493.4817, z: 53.950325} speed: 2 - m_Value: {x: 579.58923, y: 1254.9442, z: 8.661779} + m_Value: {x: 646.07245, y: 1493.4817, z: 53.950325} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -658,7 +658,7 @@ MonoBehaviour: m_Fade: m_Target: 0 speed: 2 - m_Value: 1 + m_Value: 0 m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} m_Pivot: {x: 0, y: 0, z: 0} m_Size: {x: 1, y: 1} @@ -666,13 +666,13 @@ MonoBehaviour: m_GridAxis: 1 m_gridOpacity: 0.5 m_Rotation: - m_Target: {x: -0.042836577, y: 0.89744264, z: -0.08941653, w: -0.42986205} + m_Target: {x: 0.113753475, y: -0.00000011450476, z: 0.000000050034828, w: 0.99350965} speed: 2 - m_Value: {x: 0.042836573, y: -0.8974426, z: 0.089416526, w: 0.4298622} + m_Value: {x: 0.11375341, y: -0.00000011450469, z: 0.0000000500348, w: 0.99350905} m_Size: - m_Target: 265.8147 + m_Target: 1399.2793 speed: 2 - m_Value: 265.8147 + m_Value: 1399.2793 m_Ortho: m_Target: 0 speed: 2 @@ -690,7 +690,7 @@ MonoBehaviour: m_FarClip: 10000 m_DynamicClip: 1 m_OcclusionCulling: 0 - m_LastSceneViewRotation: {x: -0.042836577, y: 0.89744264, z: -0.08941653, w: -0.42986205} + m_LastSceneViewRotation: {x: -0.12161121, y: 0.3842837, z: -0.05113765, w: -0.9137489} m_LastSceneViewOrtho: 0 m_ReplacementShader: {fileID: 0} m_ReplacementString: @@ -719,7 +719,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 702 - width: 1416 + width: 1326 height: 297 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -738,22 +738,22 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/Scripts/Network + - Assets/Scripts m_Globs: [] m_OriginalText: m_ViewMode: 1 m_StartGridSize: 64 m_LastFolders: - - Assets/Scripts/Network + - Assets/Scripts m_LastFoldersGridSize: -1 - m_LastProjectPath: C:\dev\zarodolgozat\ColorBall + m_LastProjectPath: E:\dev\zarodolgozat\ColorBall m_LockTracker: m_IsLocked: 0 m_FolderTreeState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: c4650000 - m_LastClickedID: 26052 - m_ExpandedIDs: 00000000a8650000be650000 + m_SelectedIDs: ba650000 + m_LastClickedID: 26042 + m_ExpandedIDs: 00000000a8650000b66500007e7d0000807d0000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -825,7 +825,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 0} + m_ClientGUIView: {fileID: 11} m_CreateAssetUtility: m_EndAction: {fileID: 0} m_InstanceID: 0 @@ -857,9 +857,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1417 + x: 1327 y: 73 - width: 502 + width: 592 height: 926 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -885,9 +885,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1417 + x: 1327 y: 73 - width: 502 + width: 592 height: 926 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -926,9 +926,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 933 + x: 871 y: 73 - width: 482 + width: 454 height: 608 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: