diff --git a/Assets/Scenes/project.unity b/Assets/Scenes/project.unity index c4e49fd..7db668a 100644 --- a/Assets/Scenes/project.unity +++ b/Assets/Scenes/project.unity @@ -165,8 +165,8 @@ MonoBehaviour: m_EditorClassIdentifier: pzza: {fileID: 7690701738233734169, guid: 2759fef505e00a88c9e014377f8a9be5, type: 3} SpawnRate: 2 - leftest: -4 - rightest: 4 + minXPos: -5.5 + maxXpos: 6.7 spawnHeight: 13 --- !u!1 &157770483 GameObject: @@ -275,9 +275,11 @@ MonoBehaviour: m_EditorClassIdentifier: SFX: {fileID: 620066286} Music: {fileID: 283168571} - Sound: {fileID: 2074220847} + DrilMusic: {fileID: 2074220847} background: {fileID: 8300000, guid: 6329ec00dd93f7c4f9064a826966db96, type: 3} - background2: {fileID: 8300000, guid: f3e582380aca43547b64fb0b08edef0c, type: 3} + drilLoop: {fileID: 8300000, guid: f3e582380aca43547b64fb0b08edef0c, type: 3} + deathSound: {fileID: 8300000, guid: 58fc704ce8dbe5d49a391b134278b6a7, type: 3} + crushSound: {fileID: 8300000, guid: 0470a1e62ae24854b851553af3091d2f, type: 3} --- !u!4 &252639973 Transform: m_ObjectHideFlags: 0 @@ -328,7 +330,7 @@ AudioSource: m_PlayOnAwake: 1 m_Volume: 1 m_Pitch: 1 - Loop: 0 + Loop: 1 Mute: 0 Spatialize: 0 SpatializePostEffects: 0 @@ -745,8 +747,8 @@ GameObject: - component: {fileID: 546123597} - component: {fileID: 546123596} - component: {fileID: 546123595} - - component: {fileID: 546123598} - component: {fileID: 546123599} + - component: {fileID: 546123598} m_Layer: 0 m_Name: player m_TagString: Player @@ -845,7 +847,7 @@ Transform: m_GameObject: {fileID: 546123592} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.41, y: -5.82, z: -0.13183299} + m_LocalPosition: {x: -0.1, y: -5.97, z: -0.13183299} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -864,9 +866,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: playerBody: {fileID: 546123595} + soundManger: {fileID: 0} dirt: {fileID: 8064720540177359702, guid: 4a821943fee3d6c42ae37acfae0972f8, type: 3} speed: 6 - canSpawn: 1 logic: {fileID: 1758606565} sprites: - {fileID: 1634257073513659926, guid: 70f7ce564bf332947bff42c6298edcbb, type: 3} @@ -874,7 +876,10 @@ MonoBehaviour: - {fileID: 5571474205568410654, guid: 2c77d85a9eaa5f64f973a0242b8f4c59, type: 3} - {fileID: -2388994482622123551, guid: b5317789e12c4614dbefe6bff36b51c7, type: 3} currentSpriteIndex: 0 - isAlive: 1 + maxYPos: 9.5 + minYPos: -9.5 + maxXPos: 7.5 + minXPos: -7.5 --- !u!61 &546123599 BoxCollider2D: m_ObjectHideFlags: 0 @@ -951,7 +956,7 @@ AudioSource: m_audioClip: {fileID: 0} m_Resource: {fileID: 0} m_PlayOnAwake: 1 - m_Volume: 1 + m_Volume: 0.555 m_Pitch: 1 Loop: 0 Mute: 0 @@ -1076,11 +1081,10 @@ MonoBehaviour: m_GameObject: {fileID: 635644247} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: de475b4a5af91464386596563c3e388f, type: 3} + m_Script: {fileID: 11500000, guid: 9988755e4f7a66b4486e0dfe1aa0e7d0, type: 3} m_Name: m_EditorClassIdentifier: smileyPrefab: {fileID: 1414512914352011698, guid: 19f2d4c4fad582f409d1d4e11e93a264, type: 3} - spawnRate: 3 --- !u!4 &635644249 Transform: m_ObjectHideFlags: 0 @@ -1629,6 +1633,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1e47547318a8fc568bc238efb9088603, type: 3} m_Name: m_EditorClassIdentifier: + soundManger: {fileID: 0} scoreText: {fileID: 1844401011} GameOverScreen: {fileID: 1355491032} --- !u!1 &1775552853 @@ -1991,7 +1996,7 @@ GameObject: - component: {fileID: 2074220848} - component: {fileID: 2074220847} m_Layer: 0 - m_Name: Music (1) + m_Name: DrilMusic m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2010,9 +2015,9 @@ AudioSource: m_audioClip: {fileID: 0} m_Resource: {fileID: 0} m_PlayOnAwake: 1 - m_Volume: 1 + m_Volume: 0.2 m_Pitch: 1 - Loop: 0 + Loop: 1 Mute: 0 Spatialize: 0 SpatializePostEffects: 0 diff --git a/Assets/Scenes/try.unity b/Assets/Scenes/try.unity deleted file mode 100644 index a865baa..0000000 --- a/Assets/Scenes/try.unity +++ /dev/null @@ -1,1222 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 0 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 1 - m_PVRFilteringGaussRadiusAO: 1 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &119025372 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 119025374} - - component: {fileID: 119025373} - m_Layer: 0 - m_Name: logic - m_TagString: Logic - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &119025373 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 119025372} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1e47547318a8fc568bc238efb9088603, type: 3} - m_Name: - m_EditorClassIdentifier: - GameOverScreen: {fileID: 916854443} ---- !u!4 &119025374 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 119025372} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -64.55422, y: 78.437416, z: -4.9766936} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &529574011 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 529574012} - - component: {fileID: 529574015} - - component: {fileID: 529574014} - - component: {fileID: 529574013} - m_Layer: 5 - m_Name: Button (Legacy) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &529574012 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529574011} - 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: - - {fileID: 914944323} - m_Father: {fileID: 916854444} - 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: 0, y: -187.3} - m_SizeDelta: {x: 636.4, y: 95.1} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &529574013 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529574011} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 0, g: 0, b: 0, a: 0.38431373} - 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_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0, g: 0, b: 0, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 529574014} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 119025373} - m_TargetAssemblyTypeName: logicScript, Assembly-CSharp - m_MethodName: restartGame - 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 &529574014 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529574011} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_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 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &529574015 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529574011} - m_CullTransparentMesh: 1 ---- !u!1 &595231244 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 595231248} - - component: {fileID: 595231247} - - component: {fileID: 595231246} - - component: {fileID: 595231245} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &595231245 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 595231244} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &595231246 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 595231244} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 1 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 1920, y: 1080} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &595231247 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 595231244} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 0 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &595231248 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 595231244} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 916854444} - m_Father: {fileID: 0} - 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, y: 0} ---- !u!1 &914944322 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 914944323} - - component: {fileID: 914944325} - - component: {fileID: 914944324} - m_Layer: 5 - m_Name: Text (Legacy) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &914944323 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 914944322} - 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: 529574012} - 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 &914944324 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 914944322} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 76 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 9 - m_MaxSize: 300 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Play Again ---- !u!222 &914944325 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 914944322} - m_CullTransparentMesh: 1 ---- !u!1 &916854443 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 916854444} - m_Layer: 5 - m_Name: GameOverScreen - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &916854444 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 916854443} - 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: - - {fileID: 1359313412} - - {fileID: 1661455686} - - {fileID: 529574012} - m_Father: {fileID: 595231248} - 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: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &1183705248 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1183705250} - - component: {fileID: 1183705249} - m_Layer: 0 - m_Name: pzzaSpawner - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1183705249 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1183705248} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ecd2a32dc55c5e775a0cbe743ef10a01, type: 3} - m_Name: - m_EditorClassIdentifier: - pzza: {fileID: 7690701738233734169, guid: 2759fef505e00a88c9e014377f8a9be5, type: 3} - SpawnRate: 2 - leftest: -4 - rightest: 4 - spawnHeight: 5 ---- !u!4 &1183705250 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1183705248} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.9165808, y: -4.061457, z: 0.034970872} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1298863044 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1298863048} - - component: {fileID: 1298863047} - - component: {fileID: 1298863046} - - component: {fileID: 1298863045} - - component: {fileID: 1298863049} - m_Layer: 0 - m_Name: player - m_TagString: Player - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1298863045 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1298863044} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 025d1d3668c9e1ab4878efc95caf2293, type: 3} - m_Name: - m_EditorClassIdentifier: - myRigidbody: {fileID: 1298863046} - speed: 5.06 - logic: {fileID: 0} - playerAlive: 1 ---- !u!50 &1298863046 -Rigidbody2D: - serializedVersion: 5 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1298863044} - m_BodyType: 0 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 0.0001 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_GravityScale: 0 - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 ---- !u!212 &1298863047 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1298863044} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} - 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: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: -6225946958905198027, guid: 3180d1bd1b5eefc17ba8470867577b94, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 4.79, y: 4.98} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!4 &1298863048 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1298863044} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -9.03} - m_LocalScale: {x: 0.45, y: 0.45, z: 0.45} - m_ConstrainProportionsScale: 1 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!70 &1298863049 -CapsuleCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1298863044} - m_Enabled: 1 - serializedVersion: 3 - m_Density: 1 - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_ForceSendLayers: - serializedVersion: 2 - m_Bits: 4294967295 - m_ForceReceiveLayers: - serializedVersion: 2 - m_Bits: 4294967295 - m_ContactCaptureLayers: - serializedVersion: 2 - m_Bits: 4294967295 - m_CallbackLayers: - serializedVersion: 2 - m_Bits: 4294967295 - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_CompositeOperation: 0 - m_CompositeOrder: 0 - m_Offset: {x: 0.05, y: -0.24} - m_Size: {x: 2.82, y: 4.98} - m_Direction: 0 ---- !u!1 &1359313411 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1359313412} - - component: {fileID: 1359313414} - - component: {fileID: 1359313413} - m_Layer: 5 - m_Name: Panel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1359313412 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1359313411} - 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: 916854444} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -11.422, y: 11.423} - m_SizeDelta: {x: 1884.779, y: 1393.594} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1359313413 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1359313411} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 0.59607846} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10907, 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 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1359313414 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1359313411} - m_CullTransparentMesh: 1 ---- !u!1 &1515182742 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1515182744} - - component: {fileID: 1515182743} - m_Layer: 0 - m_Name: roadMover - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1515182743 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1515182742} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3b9307263f4c2362090f571e4ff3adc8, type: 3} - m_Name: - m_EditorClassIdentifier: - road: {fileID: 8736790693498813722, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - SpawnRate: 1 ---- !u!4 &1515182744 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1515182742} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.03, y: 7.3, z: 6.65} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1661455685 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1661455686} - - component: {fileID: 1661455688} - - component: {fileID: 1661455687} - m_Layer: 5 - m_Name: Text (Legacy) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1661455686 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1661455685} - 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: 916854444} - 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: 0, y: 0} - m_SizeDelta: {x: 702, y: 237} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1661455687 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1661455685} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 129 - m_FontStyle: 1 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 141 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Game Over ---- !u!222 &1661455688 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1661455685} - m_CullTransparentMesh: 1 ---- !u!1 &1727417985 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1727417989} - - component: {fileID: 1727417988} - - component: {fileID: 1727417987} - - component: {fileID: 1727417986} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1727417986 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1727417985} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_RenderShadows: 1 - m_RequiresDepthTextureOption: 2 - m_RequiresOpaqueTextureOption: 2 - m_CameraType: 0 - m_Cameras: [] - m_RendererIndex: -1 - m_VolumeLayerMask: - serializedVersion: 2 - m_Bits: 1 - m_VolumeTrigger: {fileID: 0} - m_VolumeFrameworkUpdateModeOption: 2 - m_RenderPostProcessing: 0 - m_Antialiasing: 0 - m_AntialiasingQuality: 2 - m_StopNaN: 0 - m_Dithering: 0 - m_ClearDepth: 1 - m_AllowXRRendering: 1 - m_AllowHDROutput: 1 - m_UseScreenCoordOverride: 0 - m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} - m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} - m_RequiresDepthTexture: 0 - m_RequiresColorTexture: 0 - m_Version: 2 - m_TaaSettings: - m_Quality: 3 - m_FrameInfluence: 0.1 - m_JitterScale: 1 - m_MipBias: 0 - m_VarianceClampScale: 0.9 - m_ContrastAdaptiveSharpening: 0 ---- !u!81 &1727417987 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1727417985} - m_Enabled: 1 ---- !u!20 &1727417988 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1727417985} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 1 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1727417989 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1727417985} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1950422353 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1950422356} - - component: {fileID: 1950422355} - - component: {fileID: 1950422354} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1950422354 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1950422353} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3} - m_Name: - m_EditorClassIdentifier: - m_SendPointerHoverToParent: 1 - m_MoveRepeatDelay: 0.5 - m_MoveRepeatRate: 0.1 - m_XRTrackingOrigin: {fileID: 0} - m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_PointAction: {fileID: -1654692200621890270, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_MoveAction: {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_SubmitAction: {fileID: 392368643174621059, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_CancelAction: {fileID: 7727032971491509709, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_LeftClickAction: {fileID: 3001919216989983466, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_MiddleClickAction: {fileID: -2185481485913320682, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_RightClickAction: {fileID: -4090225696740746782, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_ScrollWheelAction: {fileID: 6240969308177333660, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_DeselectOnBackgroundClick: 1 - m_PointerBehavior: 0 - m_CursorLockBehavior: 0 - m_ScrollDeltaPerTick: 6 ---- !u!114 &1950422355 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1950422353} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_FirstSelected: {fileID: 0} - m_sendNavigationEvents: 1 - m_DragThreshold: 10 ---- !u!4 &1950422356 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1950422353} - serializedVersion: 2 - 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: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &3732711175728465369 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 8736790693498813722, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_Name - value: road - objectReference: {fileID: 0} - - target: {fileID: 8895635413579215933, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_LocalPosition.x - value: -0.00498344 - objectReference: {fileID: 0} - - target: {fileID: 8895635413579215933, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_LocalPosition.y - value: -0.0046645 - objectReference: {fileID: 0} - - target: {fileID: 8895635413579215933, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_LocalPosition.z - value: -0.00019335821 - objectReference: {fileID: 0} - - target: {fileID: 8895635413579215933, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 8895635413579215933, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8895635413579215933, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8895635413579215933, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_LocalRotation.z - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 8895635413579215933, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8895635413579215933, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8895635413579215933, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 90 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 2609a8bff369addea99a8cb36c5c9363, type: 3} ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 1727417989} - - {fileID: 1298863048} - - {fileID: 3732711175728465369} - - {fileID: 1515182744} - - {fileID: 1183705250} - - {fileID: 595231248} - - {fileID: 1950422356} - - {fileID: 119025374} diff --git a/Assets/Scenes/try.unity.meta b/Assets/Scenes/try.unity.meta deleted file mode 100644 index 5e4f633..0000000 --- a/Assets/Scenes/try.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: e5358e5b01f4acbeebf9d3737760f2e5 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/res/objects/background/neib.png b/Assets/res/objects/background/neib.png deleted file mode 100644 index 3410c68..0000000 Binary files a/Assets/res/objects/background/neib.png and /dev/null differ diff --git a/Assets/res/objects/background/neib.png.meta b/Assets/res/objects/background/neib.png.meta deleted file mode 100644 index abc59da..0000000 --- a/Assets/res/objects/background/neib.png.meta +++ /dev/null @@ -1,186 +0,0 @@ -fileFormatVersion: 2 -guid: 01552ca3797f23a4cb8cd06763b0c073 -TextureImporter: - internalIDToNameTable: - - first: - 213: 7482667652216324306 - second: Square - externalObjects: {} - serializedVersion: 13 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - flipGreenChannel: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMipmapLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 1 - wrapV: 1 - wrapW: 1 - nPOTScale: 0 - lightmap: 0 - compressionQuality: 50 - spriteMode: 2 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 256 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: 0 - textureType: 8 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - swizzle: 50462976 - cookieLightType: 1 - platformSettings: - - serializedVersion: 4 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: iOS - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Android - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: WebGL - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: - - serializedVersion: 2 - name: Square - rect: - serializedVersion: 2 - x: 0 - y: 0 - width: 256 - height: 256 - alignment: 0 - pivot: {x: 0.5, y: 0.5} - border: {x: 0, y: 0, z: 0, w: 0} - customData: - outline: [] - physicsShape: [] - tessellationDetail: 0 - bones: [] - spriteID: 2d009a6b596c7d760800000000000000 - internalID: 7482667652216324306 - vertices: [] - indices: - edges: [] - weights: [] - outline: [] - customData: - physicsShape: - - - {x: -128, y: 128} - - {x: -128, y: -128} - - {x: 128, y: -128} - - {x: 128, y: 128} - bones: [] - spriteID: 5e97eb03825dee720800000000000000 - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spriteCustomMetadata: - entries: [] - nameFileIdTable: - Square: 7482667652216324306 - mipmapLimitGroupName: - pSDRemoveMatte: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/res/objects/background/road.webp b/Assets/res/objects/background/road.webp deleted file mode 100644 index e6ed864..0000000 Binary files a/Assets/res/objects/background/road.webp and /dev/null differ diff --git a/Assets/res/objects/background/road.webp.meta b/Assets/res/objects/background/road.webp.meta deleted file mode 100644 index 729d175..0000000 --- a/Assets/res/objects/background/road.webp.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d64cfb96753f6c0bb8c4f34955d8c816 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources.meta b/Assets/res/objects/obsticals.meta similarity index 77% rename from Assets/Resources.meta rename to Assets/res/objects/obsticals.meta index 8a99015..b3c8f88 100644 --- a/Assets/Resources.meta +++ b/Assets/res/objects/obsticals.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 679f23695e7a19346894ac327da9ea4c +guid: e3ee580d173d4e2428aaea0651d59d68 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/res/objects/background/983027.png b/Assets/res/objects/obsticals/983027.png similarity index 100% rename from Assets/res/objects/background/983027.png rename to Assets/res/objects/obsticals/983027.png diff --git a/Assets/res/objects/background/983027.png.meta b/Assets/res/objects/obsticals/983027.png.meta similarity index 98% rename from Assets/res/objects/background/983027.png.meta rename to Assets/res/objects/obsticals/983027.png.meta index 4a9d300..def6eac 100644 --- a/Assets/res/objects/background/983027.png.meta +++ b/Assets/res/objects/obsticals/983027.png.meta @@ -147,7 +147,8 @@ TextureImporter: secondaryTextures: [] spriteCustomMetadata: entries: [] - nameFileIdTable: {} + nameFileIdTable: + 983027_0: 6598842402039494180 mipmapLimitGroupName: pSDRemoveMatte: 0 userData: diff --git a/Assets/res/objects/background/blocker.png b/Assets/res/objects/obsticals/blocker.png similarity index 100% rename from Assets/res/objects/background/blocker.png rename to Assets/res/objects/obsticals/blocker.png diff --git a/Assets/res/objects/background/blocker.png.meta b/Assets/res/objects/obsticals/blocker.png.meta similarity index 100% rename from Assets/res/objects/background/blocker.png.meta rename to Assets/res/objects/obsticals/blocker.png.meta diff --git a/Assets/res/objects/background/pzza.prefab b/Assets/res/objects/obsticals/pzza.prefab similarity index 100% rename from Assets/res/objects/background/pzza.prefab rename to Assets/res/objects/obsticals/pzza.prefab diff --git a/Assets/res/objects/background/pzza.prefab.meta b/Assets/res/objects/obsticals/pzza.prefab.meta similarity index 100% rename from Assets/res/objects/background/pzza.prefab.meta rename to Assets/res/objects/obsticals/pzza.prefab.meta diff --git a/Assets/res/objects/background/smily.prefab b/Assets/res/objects/obsticals/smily.prefab similarity index 86% rename from Assets/res/objects/background/smily.prefab rename to Assets/res/objects/obsticals/smily.prefab index 912798e..e8e12c1 100644 --- a/Assets/res/objects/background/smily.prefab +++ b/Assets/res/objects/obsticals/smily.prefab @@ -11,8 +11,8 @@ GameObject: - component: {fileID: 1414512914352011698} - component: {fileID: 7364768090771313916} - component: {fileID: -544228413399383367} - - component: {fileID: -1150161291899451454} - m_Layer: 6 + - component: {fileID: 94087689927367215} + m_Layer: 7 m_Name: smily m_TagString: Untagged m_Icon: {fileID: 0} @@ -28,8 +28,8 @@ Transform: m_GameObject: {fileID: 5129022569712067238} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.4048, z: 0} - m_LocalScale: {x: 4, y: 6, z: 1} + m_LocalPosition: {x: -5.7148, y: -11.0247, z: 0} + m_LocalScale: {x: 1.6285568, y: 1.535348, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} @@ -78,7 +78,7 @@ SpriteRenderer: m_SortingLayerID: -808489377 m_SortingLayer: 1 m_SortingOrder: 0 - m_Sprite: {fileID: 7482667652216324306, guid: 01552ca3797f23a4cb8cd06763b0c073, type: 3} + m_Sprite: {fileID: 6598842402039494180, guid: 1758ecebd894f184cbf92fb362f2ac22, type: 3} m_Color: {r: 0.7169812, g: 0.15895337, b: 0.15895337, a: 0.6666667} m_FlipX: 0 m_FlipY: 0 @@ -101,8 +101,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4e470878aa4e6ea4fac109edfbfb516f, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!61 &-1150161291899451454 -BoxCollider2D: +--- !u!58 &94087689927367215 +CircleCollider2D: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -136,14 +136,4 @@ BoxCollider2D: m_CompositeOperation: 0 m_CompositeOrder: 0 m_Offset: {x: 0, y: 0} - m_SpriteTilingProperty: - border: {x: 0, y: 0, z: 0, w: 0} - pivot: {x: 0.5, y: 0.5} - oldSize: {x: 1, y: 1} - newSize: {x: 4.82, y: 5.12} - adaptiveTilingThreshold: 0.5 - drawMode: 0 - adaptiveTiling: 0 - m_AutoTiling: 0 - m_Size: {x: 1, y: 1} - m_EdgeRadius: 0 + m_Radius: 2.56 diff --git a/Assets/res/objects/background/smily.prefab.meta b/Assets/res/objects/obsticals/smily.prefab.meta similarity index 100% rename from Assets/res/objects/background/smily.prefab.meta rename to Assets/res/objects/obsticals/smily.prefab.meta diff --git a/Assets/scripts/smilySpawnert.cs b/Assets/scripts/SmileyGenerator.cs similarity index 86% rename from Assets/scripts/smilySpawnert.cs rename to Assets/scripts/SmileyGenerator.cs index 2c74c20..d7e789e 100644 --- a/Assets/scripts/smilySpawnert.cs +++ b/Assets/scripts/SmileyGenerator.cs @@ -3,18 +3,17 @@ public class SmileyGenerator : MonoBehaviour { public Transform smileyPrefab; - public float spawnRate; private Transform lastSmiley; playerMovment player; void Start() { - player = GameObject.FindGameObjectWithTag("Player").GetComponent(); - InvokeRepeating("SpawnSmiley", 0f, spawnRate); + player = GameObject.FindGameObjectWithTag("Player").GetComponent(); } public void SpawnSmiley() { + if (lastSmiley != null) { Destroy(lastSmiley.gameObject); @@ -25,8 +24,8 @@ public void SpawnSmiley() if (x == player.playerBody.position.x || y == player.playerBody.position.y){ x = Random.Range(-5.5f, 6.0f); } - lastSmiley = Instantiate(smileyPrefab, new Vector2(x, y), Quaternion.identity); + } } diff --git a/Assets/scripts/SmileyGenerator.cs.meta b/Assets/scripts/SmileyGenerator.cs.meta new file mode 100644 index 0000000..55df101 --- /dev/null +++ b/Assets/scripts/SmileyGenerator.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 9988755e4f7a66b4486e0dfe1aa0e7d0 \ No newline at end of file diff --git a/Assets/scripts/SoundManger.cs b/Assets/scripts/SoundManger.cs index e68e483..fa269ea 100644 --- a/Assets/scripts/SoundManger.cs +++ b/Assets/scripts/SoundManger.cs @@ -5,16 +5,20 @@ public class SoundManger : MonoBehaviour public AudioSource SFX; public AudioSource Music; - public AudioSource Sound; - + public AudioSource DrilMusic; + [Header("Music:")] public AudioClip background; - public AudioClip background2; - + public AudioClip drilLoop; + [Header("SFX:")] + public AudioClip deathSound; + public AudioClip crushSound; void Start() { Music.clip = background; Music.Play(); + DrilMusic.clip = drilLoop; + DrilMusic.Play(); } // Update is called once per frame diff --git a/Assets/scripts/logicScript.cs b/Assets/scripts/logicScript.cs index 5b16a68..a727a38 100644 --- a/Assets/scripts/logicScript.cs +++ b/Assets/scripts/logicScript.cs @@ -4,21 +4,15 @@ public class logicScript : MonoBehaviour { - + public SoundManger soundManger; public Text scoreText; private int score = 0; - public GameObject GameOverScreen; - // Start is called once before the first execution of Update after the MonoBehaviour is created - void Start() - { - } - - // Update is called once per frame - void Update() - { - + + void Start() { + soundManger = GameObject.FindGameObjectWithTag("audio").GetComponent(); } + void Update() {} public void restartGame() { SceneManager.LoadScene(SceneManager.GetActiveScene().name); @@ -26,6 +20,7 @@ public void restartGame() { public void GameOver(){ GameOverScreen.SetActive(true); + soundManger.playSFX(soundManger.deathSound); } public void AddScore(int amount) diff --git a/Assets/scripts/playerMovment.cs b/Assets/scripts/playerMovment.cs index 4045f56..5a4f86d 100644 --- a/Assets/scripts/playerMovment.cs +++ b/Assets/scripts/playerMovment.cs @@ -6,30 +6,33 @@ public class playerMovment : MonoBehaviour public SoundManger soundManger; public Transform dirt; public float speed = 6; - public bool canSpawn = true; public logicScript logic; - private SpriteRenderer spriteRenderer; public Sprite[] sprites; public int currentSpriteIndex = 0; - public bool isAlive = true; - // Start is called once before the first execution of Update after the MonoBehaviour is created + // area of movement variables + [Header("area of movement variables")] + public float maxYPos = 9.5f; + public float minYPos = -9.5f; + public float maxXPos = 7.5f; + public float minXPos = -7.5f; + + private bool canSpawn = true; + private bool isAlive = true; + private SpriteRenderer spriteRenderer; + void Start() { logic = GameObject.FindGameObjectWithTag("Logic").GetComponent(); soundManger = GameObject.FindGameObjectWithTag("audio").GetComponent(); spriteRenderer = GetComponent(); InvokeRepeating(nameof(animate), 0.15f, 0.15f); - } - - // Update is called once per frame void Update() { if (isAlive) - movment(); + movement(); else playerBody.linearVelocity = Vector2.zero; - // soundManger.playSFX(soundManger.background2); } private void spawnDirt() @@ -49,8 +52,12 @@ void OnTriggerEnter2D(Collider2D collision) canSpawn = false; if (collision.gameObject.layer == 6) { - Debug.Log(collision.gameObject.name); - Debug.Log("lose"); + soundManger.playSFX(soundManger.crushSound); + logic.GameOver(); + isAlive = false; + } + if (collision.gameObject.layer == 7) + { logic.GameOver(); isAlive = false; } @@ -72,35 +79,33 @@ private void animate() spriteRenderer.sprite = sprites[currentSpriteIndex]; } - private void movment() + private void movement() { - if (Input.GetKey(KeyCode.RightArrow) && transform.position.x < 6.7) - { - playerBody.linearVelocity = Vector2.right * speed; - spawnDirt(); - } - else if (Input.GetKey(KeyCode.LeftArrow) && transform.position.x > -7.5) + Vector2 direction = Vector2.zero; + + // Check for key presses and adjust the direction vector accordingly + if ((Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.D)) && transform.position.x < maxXPos) { - playerBody.linearVelocity = Vector2.left * speed; - spawnDirt(); + direction += Vector2.right; } - else if (Input.GetKey(KeyCode.DownArrow) && transform.position.y > -9.5) + if ((Input.GetKey(KeyCode.LeftArrow) || Input.GetKey(KeyCode.A)) && transform.position.x > minXPos) { - playerBody.linearVelocity = Vector2.down * speed; - spawnDirt(); + direction += Vector2.left; } - else if (Input.GetKey(KeyCode.UpArrow) && transform.position.y < 9.5) + if ((Input.GetKey(KeyCode.UpArrow) || Input.GetKey(KeyCode.W)) && transform.position.y < maxYPos) { - playerBody.linearVelocity = Vector2.up * speed; - spawnDirt(); + direction += Vector2.up; } - else + if ((Input.GetKey(KeyCode.DownArrow) || Input.GetKey(KeyCode.S)) && transform.position.y > minYPos) { - playerBody.linearVelocity = Vector2.zero; - spawnDirt(); + direction += Vector2.down; } - } + // Normalize the direction to ensure consistent speed in diagonal movement + direction.Normalize(); + playerBody.linearVelocity = direction * speed; + spawnDirt(); + } public void setSpeed(float speed) { this.speed = speed; diff --git a/Assets/scripts/pzzaSpawner.cs b/Assets/scripts/pzzaSpawner.cs index b193dd4..d2a41e4 100644 --- a/Assets/scripts/pzzaSpawner.cs +++ b/Assets/scripts/pzzaSpawner.cs @@ -3,19 +3,15 @@ public class pzzaSpawner : MonoBehaviour { public GameObject pzza; - public float SpawnRate= 2; - private float timer = 0; - public float leftest = -5.5f; - public float rightest = 6.7f; + public float SpawnRate = 2; + public float minXPos = -5.5f; + public float maxXpos = 6.7f; public float spawnHeight = 13 ; - // Start is called once before the first execution of Update after the MonoBehaviour is created - void Start() - { - - } + private float timer = 0; + + void Start(){} - // Update is called once per frame void Update() { if (timer < SpawnRate) @@ -25,7 +21,7 @@ void Update() else { // Calculate the random X position within bounds - float randomX = Random.Range(leftest, rightest); + float randomX = Random.Range(minXPos, maxXpos); // Set the spawn position above the visible area Vector2 spawnPosition = new Vector2(randomX, spawnHeight); diff --git a/Assets/scripts/smilySpawnert.cs.meta b/Assets/scripts/smilySpawnert.cs.meta deleted file mode 100644 index 673347f..0000000 --- a/Assets/scripts/smilySpawnert.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: de475b4a5af91464386596563c3e388f \ No newline at end of file diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index a1beb0c..17efede 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -16,7 +16,7 @@ TagManager: - Water - UI - bzza - - + - quite - - -