diff --git a/Space Shooter/Assets/Background.meta b/Space Shooter/Assets/Background.meta new file mode 100644 index 0000000..882be0b --- /dev/null +++ b/Space Shooter/Assets/Background.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 85080f4894abe714cb5f298b241dcafd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/Background/8-bit-weapon-bits-with-byte-background.png b/Space Shooter/Assets/Background/8-bit-weapon-bits-with-byte-background.png new file mode 100644 index 0000000..7a9e3ac Binary files /dev/null and b/Space Shooter/Assets/Background/8-bit-weapon-bits-with-byte-background.png differ diff --git a/Space Shooter/Assets/Background/8-bit-weapon-bits-with-byte-background.png.meta b/Space Shooter/Assets/Background/8-bit-weapon-bits-with-byte-background.png.meta new file mode 100644 index 0000000..a7e9569 --- /dev/null +++ b/Space Shooter/Assets/Background/8-bit-weapon-bits-with-byte-background.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: b410476451990fb478ddd4e3af14e34c +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: bffca45a75578a44b98085fc813c9c47 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/Prefabs/Asteroid.prefab b/Space Shooter/Assets/Prefabs/Asteroid.prefab index 98f8b19..d55052d 100644 --- a/Space Shooter/Assets/Prefabs/Asteroid.prefab +++ b/Space Shooter/Assets/Prefabs/Asteroid.prefab @@ -16,7 +16,7 @@ GameObject: - component: {fileID: 7218375903250806281} m_Layer: 0 m_Name: Asteroid - m_TagString: Untagged + m_TagString: Enemy m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -30,7 +30,7 @@ Transform: m_GameObject: {fileID: 7218375903250806280} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 4.3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 0.75, y: 0.75, z: 0.75} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -150,4 +150,3 @@ MonoBehaviour: playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd, type: 3} scoreValue: 10 - gameController: {fileID: 0} diff --git a/Space Shooter/Assets/Prefabs/Astroid Medium.prefab b/Space Shooter/Assets/Prefabs/Astroid Medium.prefab new file mode 100644 index 0000000..af22e46 --- /dev/null +++ b/Space Shooter/Assets/Prefabs/Astroid Medium.prefab @@ -0,0 +1,152 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &8166473770033220846 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4032886197058174978} + - component: {fileID: 6022110816538964993} + - component: {fileID: 50754681842280876} + - component: {fileID: 70581357458382362} + - component: {fileID: 114995847423578916} + - component: {fileID: 114620582996179708} + m_Layer: 0 + m_Name: Astroid Medium + m_TagString: Enemy + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4032886197058174978 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8166473770033220846} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.34, y: 2.19, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &6022110816538964993 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8166473770033220846} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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: 21300000, guid: 1134e2209c4522e4dbb656444e6b9b2d, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 0.83} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!50 &50754681842280876 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8166473770033220846} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 0 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!70 &70581357458382362 +CapsuleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8166473770033220846} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: -0.003595829, y: 0.0071855783} + m_Size: {x: 0.7626753, y: 0.7844322} + m_Direction: 0 +--- !u!114 &114995847423578916 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8166473770033220846} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a559d7589b04814da526549d0792e0f, type: 3} + m_Name: + m_EditorClassIdentifier: + speed: -2.5 +--- !u!114 &114620582996179708 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8166473770033220846} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9e22954f4d28c134a8c3947b377ebf89, type: 3} + m_Name: + m_EditorClassIdentifier: + explosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd, + type: 3} + playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd, + type: 3} + scoreValue: 30 diff --git a/Space Shooter/Assets/Prefabs/Astroid Medium.prefab.meta b/Space Shooter/Assets/Prefabs/Astroid Medium.prefab.meta new file mode 100644 index 0000000..49f1a27 --- /dev/null +++ b/Space Shooter/Assets/Prefabs/Astroid Medium.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 11da5b6a581e13942b4d282879d9ebc3 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/Prefabs/Astroid big.prefab b/Space Shooter/Assets/Prefabs/Astroid big.prefab new file mode 100644 index 0000000..8a7ffa6 --- /dev/null +++ b/Space Shooter/Assets/Prefabs/Astroid big.prefab @@ -0,0 +1,152 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &8912008481613253208 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7586183337648207037} + - component: {fileID: 8374794089926880079} + - component: {fileID: 50069649204159834} + - component: {fileID: 114417053360466014} + - component: {fileID: 70893126990972610} + - component: {fileID: 114637252791697022} + m_Layer: 0 + m_Name: Astroid big + m_TagString: Enemy + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7586183337648207037 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8912008481613253208} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 3.27, z: 0} + m_LocalScale: {x: 1.5, y: 1.5, z: 1.5} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &8374794089926880079 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8912008481613253208} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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: 21300000, guid: b892d417c5f93fb4b94e865ea9a3bc5d, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 0.83} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!50 &50069649204159834 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8912008481613253208} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 0 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!114 &114417053360466014 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8912008481613253208} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a559d7589b04814da526549d0792e0f, type: 3} + m_Name: + m_EditorClassIdentifier: + speed: -2.5 +--- !u!70 &70893126990972610 +CapsuleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8912008481613253208} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0.0071916184, y: -0.007094781} + m_Size: {x: 0.78425044, y: 0.78425044} + m_Direction: 0 +--- !u!114 &114637252791697022 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8912008481613253208} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9e22954f4d28c134a8c3947b377ebf89, type: 3} + m_Name: + m_EditorClassIdentifier: + explosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd, + type: 3} + playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd, + type: 3} + scoreValue: 50 diff --git a/Space Shooter/Assets/Prefabs/Astroid big.prefab.meta b/Space Shooter/Assets/Prefabs/Astroid big.prefab.meta new file mode 100644 index 0000000..a6566ba --- /dev/null +++ b/Space Shooter/Assets/Prefabs/Astroid big.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8fc474ccfc615b548b60d1ea6e745603 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/Prefabs/EnemyPlane.prefab b/Space Shooter/Assets/Prefabs/EnemyPlane.prefab new file mode 100644 index 0000000..c54ec08 --- /dev/null +++ b/Space Shooter/Assets/Prefabs/EnemyPlane.prefab @@ -0,0 +1,297 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4114502191800527103 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8749288782786290542} + m_Layer: 0 + m_Name: ShotSpawn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8749288782786290542 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4114502191800527103} + m_LocalRotation: {x: 0, y: 0, z: 1, w: 0} + m_LocalPosition: {x: 0, y: -0.312, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 7921410875687991777} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180} +--- !u!1 &7165778315991214951 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7921410875687991777} + - component: {fileID: 4177656676649779607} + - component: {fileID: 70297004137189678} + - component: {fileID: 50631517036360316} + - component: {fileID: 114877878548008250} + - component: {fileID: 114722790963509320} + - component: {fileID: 82500581682388278} + - component: {fileID: 114839853186454012} + m_Layer: 0 + m_Name: EnemyPlane + m_TagString: Enemy + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7921410875687991777 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7165778315991214951} + 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: 8749288782786290542} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &4177656676649779607 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7165778315991214951} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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: 21300000, guid: acf42413e9c121a4e86a414fdf4dbabb, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 0.54, y: 0.62} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!70 &70297004137189678 +CapsuleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7165778315991214951} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_Size: {x: 0.54, y: 0.62} + m_Direction: 0 +--- !u!50 &50631517036360316 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7165778315991214951} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 0 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!114 &114877878548008250 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7165778315991214951} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9e22954f4d28c134a8c3947b377ebf89, type: 3} + m_Name: + m_EditorClassIdentifier: + explosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd, + type: 3} + playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd, + type: 3} + scoreValue: 100 +--- !u!114 &114722790963509320 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7165778315991214951} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bda0207b3f425f4438a4f936b71c872e, type: 3} + m_Name: + m_EditorClassIdentifier: + shot: {fileID: 997488360168460806, guid: c85b80821c039654db2c0c2dba8ad57e, type: 3} + shotSpawn: {fileID: 8749288782786290542} + fireRate: 1.5 + delay: 0.5 +--- !u!82 &82500581682388278 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7165778315991214951} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: d9aceb0cc02bf144a89d5dba9c09ccd3, type: 3} + m_PlayOnAwake: 0 + m_Volume: 0.5 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!114 &114839853186454012 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7165778315991214951} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a559d7589b04814da526549d0792e0f, type: 3} + m_Name: + m_EditorClassIdentifier: + speed: -2.5 diff --git a/Space Shooter/Assets/Prefabs/EnemyPlane.prefab.meta b/Space Shooter/Assets/Prefabs/EnemyPlane.prefab.meta new file mode 100644 index 0000000..4eab5dc --- /dev/null +++ b/Space Shooter/Assets/Prefabs/EnemyPlane.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d9c4662e7aa7e7946adb1d9ca73ff4ed +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/Prefabs/Rocket.prefab b/Space Shooter/Assets/Prefabs/Rocket.prefab new file mode 100644 index 0000000..8bd0673 --- /dev/null +++ b/Space Shooter/Assets/Prefabs/Rocket.prefab @@ -0,0 +1,134 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &976044211618631744 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3535400221273366587} + - component: {fileID: 5103908789398829642} + - component: {fileID: 50584473148551538} + - component: {fileID: 114298626987437212} + - component: {fileID: 70707879966414902} + m_Layer: 0 + m_Name: Rocket + m_TagString: pick up + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3535400221273366587 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 976044211618631744} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.372609, y: 1.1452816, z: 0} + m_LocalScale: {x: 4, y: 4, z: 4} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &5103908789398829642 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 976044211618631744} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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: 21300000, guid: 4102c2587e4e961449efd5d5e60b0f4c, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 0.1, y: 0.13} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!50 &50584473148551538 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 976044211618631744} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 0 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!114 &114298626987437212 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 976044211618631744} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a559d7589b04814da526549d0792e0f, type: 3} + m_Name: + m_EditorClassIdentifier: + speed: -2.5 +--- !u!70 &70707879966414902 +CapsuleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 976044211618631744} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_Size: {x: 0.1, y: 0.13} + m_Direction: 0 diff --git a/Space Shooter/Assets/Prefabs/Rocket.prefab.meta b/Space Shooter/Assets/Prefabs/Rocket.prefab.meta new file mode 100644 index 0000000..8aa85b3 --- /dev/null +++ b/Space Shooter/Assets/Prefabs/Rocket.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 87ff50dc609317d48b8ef5db73195960 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/Prefabs/RocketLaunch (enemy).prefab b/Space Shooter/Assets/Prefabs/RocketLaunch (enemy).prefab new file mode 100644 index 0000000..e5c3802 --- /dev/null +++ b/Space Shooter/Assets/Prefabs/RocketLaunch (enemy).prefab @@ -0,0 +1,166 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &997488360168460806 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5099918702118858826} + - component: {fileID: 5520605024924952370} + - component: {fileID: 114037257256789170} + - component: {fileID: 114097449171881602} + - component: {fileID: 50238082540162378} + - component: {fileID: 70673185497874712} + - component: {fileID: 114495491952009306} + m_Layer: 0 + m_Name: RocketLaunch (enemy) + m_TagString: Enemy + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5099918702118858826 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 997488360168460806} + m_LocalRotation: {x: 1, y: 0, z: 0, w: 0} + m_LocalPosition: {x: -4.285167, y: -0.08, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0} +--- !u!212 &5520605024924952370 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 997488360168460806} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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: 21300000, guid: 4102c2587e4e961449efd5d5e60b0f4c, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 0.1, y: 0.13} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!114 &114037257256789170 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 997488360168460806} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9e22954f4d28c134a8c3947b377ebf89, type: 3} + m_Name: + m_EditorClassIdentifier: + explosion: {fileID: 0} + playerExplosion: {fileID: 4135666156658398521, guid: 797306acff402e74187bde1b00d560bd, + type: 3} + scoreValue: 0 + health: 0 +--- !u!114 &114097449171881602 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 997488360168460806} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a559d7589b04814da526549d0792e0f, type: 3} + m_Name: + m_EditorClassIdentifier: + speed: -20 +--- !u!50 &50238082540162378 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 997488360168460806} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 0 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!70 &70673185497874712 +CapsuleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 997488360168460806} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_Size: {x: 0.1, y: 0.13} + m_Direction: 0 +--- !u!114 &114495491952009306 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 997488360168460806} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a559d7589b04814da526549d0792e0f, type: 3} + m_Name: + m_EditorClassIdentifier: + speed: 10 diff --git a/Space Shooter/Assets/Prefabs/RocketLaunch (enemy).prefab.meta b/Space Shooter/Assets/Prefabs/RocketLaunch (enemy).prefab.meta new file mode 100644 index 0000000..656f36f --- /dev/null +++ b/Space Shooter/Assets/Prefabs/RocketLaunch (enemy).prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c85b80821c039654db2c0c2dba8ad57e +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/Scenes/Main.unity b/Space Shooter/Assets/Scenes/Main.unity index c3601c3..5a9a7d4 100644 --- a/Space Shooter/Assets/Scenes/Main.unity +++ b/Space Shooter/Assets/Scenes/Main.unity @@ -436,6 +436,7 @@ RectTransform: - {fileID: 349740632} - {fileID: 282751072} - {fileID: 187312670} + - {fileID: 1755535810} m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -521,7 +522,7 @@ Transform: m_GameObject: {fileID: 519420028} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 2.15, z: -1} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 0.7625, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -555,7 +556,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: a7d03ecd40f6a844d82f5c0249910b3c, type: 3} m_Name: m_EditorClassIdentifier: - hazard: {fileID: 7218375903250806280, guid: f3261d2421885334b900562a369c6608, type: 3} + hazards: + - {fileID: 7218375903250806280, guid: f3261d2421885334b900562a369c6608, type: 3} + - {fileID: 8166473770033220846, guid: 11da5b6a581e13942b4d282879d9ebc3, type: 3} + - {fileID: 8912008481613253208, guid: 8fc474ccfc615b548b60d1ea6e745603, type: 3} + - {fileID: 7165778315991214951, guid: d9c4662e7aa7e7946adb1d9ca73ff4ed, type: 3} spawnValues: {x: 4.85, y: 5} hazardCount: 10 spawnWait: 0.5 @@ -564,6 +569,8 @@ MonoBehaviour: scoreText: {fileID: 349740633} restartText: {fileID: 282751073} gameOverText: {fileID: 187312671} + healthText: {fileID: 1755535811} + health: 3 --- !u!4 &590622963 Transform: m_ObjectHideFlags: 0 @@ -732,7 +739,7 @@ AudioSource: OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 8300000, guid: 9bc8b66baf0a5694d9f6e6e72b11e0db, type: 3} m_PlayOnAwake: 0 - m_Volume: 1 + m_Volume: 0.5 m_Pitch: 1 Loop: 0 Mute: 0 @@ -895,6 +902,85 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c8826fc2a30f5694792eb569b1bcdc1f, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &778017807 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 778017808} + - component: {fileID: 778017809} + m_Layer: 0 + m_Name: 8-bit-weapon-bits-with-byte-background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &778017808 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 778017807} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.01, y: 0.75, z: -3.79} + m_LocalScale: {x: 1.5923724, y: 1.3731124, z: 1.6761816} + m_Children: [] + m_Father: {fileID: 1559994810} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &778017809 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 778017807} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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: 21300000, guid: b410476451990fb478ddd4e3af14e34c, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 6.4, y: 6.4} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &1517903066 GameObject: m_ObjectHideFlags: 0 @@ -925,6 +1011,226 @@ Transform: m_Father: {fileID: 597029169} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1559356819 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1559356821} + - component: {fileID: 1559356820} + m_Layer: 0 + m_Name: Laser_Shoot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!82 &1559356820 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1559356819} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 8300000, guid: 9bc8b66baf0a5694d9f6e6e72b11e0db, type: 3} + m_PlayOnAwake: 0 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!4 &1559356821 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1559356819} + 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: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1559994806 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1559994810} + - component: {fileID: 1559994809} + - component: {fileID: 1559994808} + - component: {fileID: 1559994807} + m_Layer: 0 + m_Name: Quad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &1559994807 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1559994806} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Convex: 0 + m_CookingOptions: 14 + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1559994808 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1559994806} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + 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_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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 +--- !u!33 &1559994809 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1559994806} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1559994810 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1559994806} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.0069277138, y: 1.3756611, z: 4.221752} + m_LocalScale: {x: 1.0134, y: 1.0134, z: 1.0134} + m_Children: + - {fileID: 778017808} + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1636230138 GameObject: m_ObjectHideFlags: 0 @@ -991,3 +1297,80 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1755535809 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1755535810} + - component: {fileID: 1755535812} + - component: {fileID: 1755535811} + m_Layer: 5 + m_Name: Health Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1755535810 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1755535809} + 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: 420651326} + m_RootOrder: 3 + 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: -300, y: -188} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1755535811 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1755535809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 20 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!222 &1755535812 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1755535809} + m_CullTransparentMesh: 0 diff --git a/Space Shooter/Assets/Sprites/Astroid Medium.png b/Space Shooter/Assets/Sprites/Astroid Medium.png new file mode 100644 index 0000000..ff578f6 Binary files /dev/null and b/Space Shooter/Assets/Sprites/Astroid Medium.png differ diff --git a/Space Shooter/Assets/Sprites/Astroid Medium.png.meta b/Space Shooter/Assets/Sprites/Astroid Medium.png.meta new file mode 100644 index 0000000..531487a --- /dev/null +++ b/Space Shooter/Assets/Sprites/Astroid Medium.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 1134e2209c4522e4dbb656444e6b9b2d +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 36a08a82c36d25a459469df358e67da3 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/Sprites/Astroid big.png b/Space Shooter/Assets/Sprites/Astroid big.png new file mode 100644 index 0000000..24a198d Binary files /dev/null and b/Space Shooter/Assets/Sprites/Astroid big.png differ diff --git a/Space Shooter/Assets/Sprites/Astroid big.png.meta b/Space Shooter/Assets/Sprites/Astroid big.png.meta new file mode 100644 index 0000000..2c4e3e2 --- /dev/null +++ b/Space Shooter/Assets/Sprites/Astroid big.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: b892d417c5f93fb4b94e865ea9a3bc5d +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 7d2d16068a44ef34292e053b94d84911 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/Sprites/Rocket.png b/Space Shooter/Assets/Sprites/Rocket.png new file mode 100644 index 0000000..cac5202 Binary files /dev/null and b/Space Shooter/Assets/Sprites/Rocket.png differ diff --git a/Space Shooter/Assets/Sprites/Rocket.png.meta b/Space Shooter/Assets/Sprites/Rocket.png.meta new file mode 100644 index 0000000..8f5db88 --- /dev/null +++ b/Space Shooter/Assets/Sprites/Rocket.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 4102c2587e4e961449efd5d5e60b0f4c +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: b5aa7447b9d64cc4b8c28182ec3776dd + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/Sprites/plane (1) (1).png b/Space Shooter/Assets/Sprites/plane (1) (1).png new file mode 100644 index 0000000..4dbcba9 Binary files /dev/null and b/Space Shooter/Assets/Sprites/plane (1) (1).png differ diff --git a/Space Shooter/Assets/Sprites/plane (1) (1).png.meta b/Space Shooter/Assets/Sprites/plane (1) (1).png.meta new file mode 100644 index 0000000..2153787 --- /dev/null +++ b/Space Shooter/Assets/Sprites/plane (1) (1).png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: acf42413e9c121a4e86a414fdf4dbabb +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: b304ffd772fd9734baf4e2c531aded85 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/script/DestroyByContact.cs b/Space Shooter/Assets/script/DestroyByContact.cs index 74aa0ff..7c2d432 100644 --- a/Space Shooter/Assets/script/DestroyByContact.cs +++ b/Space Shooter/Assets/script/DestroyByContact.cs @@ -8,6 +8,8 @@ public class DestroyByContact : MonoBehaviour public GameObject playerExplosion; public int scoreValue; private GameController gameController; + public int health; + public GameObject Player; void Start() { @@ -24,17 +26,23 @@ public class DestroyByContact : MonoBehaviour void OnTriggerEnter2D(Collider2D other) { - if (other.tag == "Boundary") + if (other.CompareTag ("Boundary") || other.CompareTag("Enemy")) { return; } - Instantiate(explosion, transform.position, transform.rotation); + if (explosion != null) + { + Instantiate(explosion, transform.position, transform.rotation); + } if (other.tag == "Player") { Instantiate(playerExplosion, other.transform.position, other.transform.rotation); - gameController.GameOver (); + gameController.GameOver(); + } - gameController.AddScore (scoreValue); + + + gameController.AddScore(scoreValue); Destroy(other.gameObject); Destroy(gameObject); @@ -42,3 +50,5 @@ public class DestroyByContact : MonoBehaviour } + + diff --git a/Space Shooter/Assets/script/EvasiveManeuver.cs b/Space Shooter/Assets/script/EvasiveManeuver.cs new file mode 100644 index 0000000..6a72ed6 --- /dev/null +++ b/Space Shooter/Assets/script/EvasiveManeuver.cs @@ -0,0 +1,48 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class EvasiveManeuver : MonoBehaviour +{ + public Vector2 startWait; + public Vector2 maneuverTime; + public Vector2 maneuverWait; + public float dodge; + public float smoothing; + public Boundary boundary; + + private float currentSpeed; + private float targetManeuver; + private Rigidbody2D rb; + + void Start() + { + rb = GetComponent(); + currentSpeed = rb.velocity.y; + StartCoroutine(Evade()); + } + + IEnumerator Evade() + { + yield return new WaitForSeconds(Random.Range(startWait.x, startWait.y)); + + while (true) + { + targetManeuver = Random.Range(1, dodge) * -Mathf.Sign(transform.position.x); + yield return new WaitForSeconds(Random.Range(maneuverTime.x, maneuverTime.y)); + targetManeuver = 0; + yield return new WaitForSeconds(Random.Range(maneuverWait.x, maneuverWait.y)); + } + } + + void FixedUpdate() + { + float newManeuver = Mathf.MoveTowards(rb.velocity.x, targetManeuver, Time.deltaTime * smoothing); + rb.velocity = new Vector2(newManeuver, currentSpeed); + rb.position = new Vector2 + ( + Mathf.Clamp(rb.position.x, boundary.xMin, boundary.xMax), + Mathf.Clamp(rb.position.y, boundary.yMin, boundary.yMax) + ); + } +} \ No newline at end of file diff --git a/Space Shooter/Assets/script/EvasiveManeuver.cs.meta b/Space Shooter/Assets/script/EvasiveManeuver.cs.meta new file mode 100644 index 0000000..a9837ab --- /dev/null +++ b/Space Shooter/Assets/script/EvasiveManeuver.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 55a0e8c35689ad642b7775951ada28d8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/Assets/script/GameController.cs b/Space Shooter/Assets/script/GameController.cs index d38a196..c5163fe 100644 --- a/Space Shooter/Assets/script/GameController.cs +++ b/Space Shooter/Assets/script/GameController.cs @@ -4,7 +4,7 @@ using System.Collections; public class GameController : MonoBehaviour { - public GameObject hazard; + public GameObject[] hazards; public Vector2 spawnValues; public int hazardCount; public float spawnWait; @@ -15,6 +15,10 @@ public class GameController : MonoBehaviour private int score; public Text restartText; public Text gameOverText; + public Text healthText; + public int health; + + private bool restart; private bool gameOver; @@ -26,10 +30,11 @@ public class GameController : MonoBehaviour gameOverText.text = ""; score = 0; UpdateScore(); - StartCoroutine (SpawnWaves()); + healthText.text = "Health: " + health; + StartCoroutine(SpawnWaves()); } - void Update () + void Update() { if (restart) { @@ -46,6 +51,7 @@ public class GameController : MonoBehaviour { for (int i = 0; i < hazardCount; i++) { + GameObject hazard = hazards[Random.Range(0, hazards.Length)]; Vector2 spawnPosition = new Vector2(Random.Range(-spawnValues.x, spawnValues.x), spawnValues.y); Quaternion spawnRotation = Quaternion.identity; Instantiate(hazard, spawnPosition, spawnRotation); @@ -67,13 +73,29 @@ public class GameController : MonoBehaviour score += newScoreValue; UpdateScore(); } - void UpdateScore () + void UpdateScore() { scoreText.text = "Score: " + score; } - public void GameOver () + public void GameOver() { gameOverText.text = "Game Over!"; gameOver = true; } + + + public void UpdateHealth() + { + health -= 1; + healthText.text = "Health: " + health; + if (health <= 0) + { + GameOver(); + } + } + + + + + } diff --git a/Space Shooter/Assets/script/WeaponController.cs b/Space Shooter/Assets/script/WeaponController.cs new file mode 100644 index 0000000..d8dec3f --- /dev/null +++ b/Space Shooter/Assets/script/WeaponController.cs @@ -0,0 +1,28 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class WeaponController : MonoBehaviour + + +{ + + public GameObject shot; + public Transform shotSpawn; + public float fireRate; + public float delay; + + private AudioSource audioSource; + + void Start() + { + audioSource = GetComponent(); + InvokeRepeating("Fire", delay, fireRate); + } + + void Fire() + { + Instantiate(shot, shotSpawn.position, shotSpawn.rotation); + audioSource.Play(); + } +} diff --git a/Space Shooter/Assets/script/WeaponController.cs.meta b/Space Shooter/Assets/script/WeaponController.cs.meta new file mode 100644 index 0000000..17274ac --- /dev/null +++ b/Space Shooter/Assets/script/WeaponController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bda0207b3f425f4438a4f936b71c872e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Space Shooter/ProjectSettings/TagManager.asset b/Space Shooter/ProjectSettings/TagManager.asset index 6e97291..7d1bbea 100644 --- a/Space Shooter/ProjectSettings/TagManager.asset +++ b/Space Shooter/ProjectSettings/TagManager.asset @@ -5,6 +5,8 @@ TagManager: serializedVersion: 2 tags: - Boundary + - pick up + - Enemy layers: - Default - TransparentFX