From c4453b250c8c3b0f8b577dbce0eb6c5b1bfe5a91 Mon Sep 17 00:00:00 2001 From: Adam P Skawinski Date: Sun, 23 Feb 2020 23:56:04 -0500 Subject: [PATCH] Boss Update The Boss is in :) --- SpaceShooter/Assets/Prefabs/Boss.prefab | 179 +++++ SpaceShooter/Assets/Prefabs/Boss.prefab.meta | 7 + SpaceShooter/Assets/Scenes/Main.unity | 611 +++++++++++++++++- .../Assets/Scripts/DestroyByContact_BOSS.cs | 18 - .../Scripts/Enemy Game Controllers.meta | 8 + .../DestroyByContact.cs | 0 .../DestroyByContact.cs.meta | 0 .../DestroyByContact_1.cs | 0 .../DestroyByContact_1.cs.meta | 0 .../DestroyByContact_BOSS.cs | 75 +++ .../DestroyByContact_BOSS.cs.meta | 0 .../GameController.cs | 0 .../GameController.cs.meta | 0 .../GameController_1.cs | 0 .../GameController_1.cs.meta | 0 .../GameController_Boss.cs | 61 ++ .../GameController_Boss.cs.meta | 11 + 17 files changed, 922 insertions(+), 48 deletions(-) create mode 100644 SpaceShooter/Assets/Prefabs/Boss.prefab create mode 100644 SpaceShooter/Assets/Prefabs/Boss.prefab.meta delete mode 100644 SpaceShooter/Assets/Scripts/DestroyByContact_BOSS.cs create mode 100644 SpaceShooter/Assets/Scripts/Enemy Game Controllers.meta rename SpaceShooter/Assets/Scripts/{ => Enemy Game Controllers}/DestroyByContact.cs (100%) rename SpaceShooter/Assets/Scripts/{ => Enemy Game Controllers}/DestroyByContact.cs.meta (100%) rename SpaceShooter/Assets/Scripts/{ => Enemy Game Controllers}/DestroyByContact_1.cs (100%) rename SpaceShooter/Assets/Scripts/{ => Enemy Game Controllers}/DestroyByContact_1.cs.meta (100%) create mode 100644 SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_BOSS.cs rename SpaceShooter/Assets/Scripts/{ => Enemy Game Controllers}/DestroyByContact_BOSS.cs.meta (100%) rename SpaceShooter/Assets/Scripts/{ => Enemy Game Controllers}/GameController.cs (100%) rename SpaceShooter/Assets/Scripts/{ => Enemy Game Controllers}/GameController.cs.meta (100%) rename SpaceShooter/Assets/Scripts/{ => Enemy Game Controllers}/GameController_1.cs (100%) rename SpaceShooter/Assets/Scripts/{ => Enemy Game Controllers}/GameController_1.cs.meta (100%) create mode 100644 SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_Boss.cs create mode 100644 SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_Boss.cs.meta diff --git a/SpaceShooter/Assets/Prefabs/Boss.prefab b/SpaceShooter/Assets/Prefabs/Boss.prefab new file mode 100644 index 0000000..64688da --- /dev/null +++ b/SpaceShooter/Assets/Prefabs/Boss.prefab @@ -0,0 +1,179 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5435074586135439926 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8177340505379955183} + - component: {fileID: 9188401763722569958} + - component: {fileID: 12989599383475081} + - component: {fileID: 4640328635216248402} + - component: {fileID: 5435074586135439929} + m_Layer: 0 + m_Name: Boss + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8177340505379955183 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5435074586135439926} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 11.14, z: 0} + m_LocalScale: {x: 2, y: 2, z: 1} + m_Children: + - {fileID: 8953245506337528971} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!50 &9188401763722569958 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5435074586135439926} + 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 &12989599383475081 +CapsuleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5435074586135439926} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: -0.004892828, y: -0.009052218} + m_Size: {x: 1.0825448, y: 0.84547484} + m_Direction: 1 +--- !u!114 &4640328635216248402 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5435074586135439926} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ff6ebfbd9061a54e90a0f68a9da7e82, type: 3} + m_Name: + m_EditorClassIdentifier: + speed: -0.01 +--- !u!114 &5435074586135439929 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5435074586135439926} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f70d1d32239a70747a067f2b089b2f1c, type: 3} + m_Name: + m_EditorClassIdentifier: + health_2: 500 +--- !u!1 &8953245506337528968 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8953245506337528971} + - component: {fileID: 8953245506337528970} + m_Layer: 0 + m_Name: enemyBlue2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8953245506337528971 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8953245506337528968} + 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: 8177340505379955183} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &8953245506337528970 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8953245506337528968} + 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: 0d6ead6b8f2f0ff4f81f5d8fa9c83301, 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.04, y: 0.84} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 diff --git a/SpaceShooter/Assets/Prefabs/Boss.prefab.meta b/SpaceShooter/Assets/Prefabs/Boss.prefab.meta new file mode 100644 index 0000000..a2f9cf5 --- /dev/null +++ b/SpaceShooter/Assets/Prefabs/Boss.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f24d2a605ceb07843bfb6797b4a46b86 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/SpaceShooter/Assets/Scenes/Main.unity b/SpaceShooter/Assets/Scenes/Main.unity index 0a9fcac..6107577 100644 --- a/SpaceShooter/Assets/Scenes/Main.unity +++ b/SpaceShooter/Assets/Scenes/Main.unity @@ -142,11 +142,11 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 453447294} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -65.21} + m_AnchoredPosition: {x: 0, y: -76.7} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &637983 @@ -169,10 +169,10 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 25 + m_FontSize: 20 m_FontStyle: 0 m_BestFit: 0 - m_MinSize: 2 + m_MinSize: 1 m_MaxSize: 50 m_Alignment: 0 m_AlignByGeometry: 0 @@ -180,7 +180,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: '''Q'' - Tank' + m_Text: '''Q'' - Tank (5pt)' --- !u!222 &637984 CanvasRenderer: m_ObjectHideFlags: 0 @@ -362,8 +362,9 @@ RectTransform: - {fileID: 9615813} - {fileID: 453447294} - {fileID: 1379383719} + - {fileID: 1815080235} m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -444,6 +445,83 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 29912842} m_CullTransparentMesh: 0 +--- !u!1 &29916359 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 29916360} + - component: {fileID: 29916362} + - component: {fileID: 29916361} + m_Layer: 5 + m_Name: Shooting (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &29916360 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 29916359} + 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: 1815080235} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -31.2} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &29916361 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 29916359} + 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: 50 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: '''Asteroid'' - 1 health' +--- !u!222 &29916362 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 29916359} + m_CullTransparentMesh: 0 --- !u!1 &112173863 GameObject: m_ObjectHideFlags: 0 @@ -744,7 +822,7 @@ GameObject: - component: {fileID: 453447296} - component: {fileID: 453447295} m_Layer: 5 - m_Name: Shooting + m_Name: Controls m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -761,6 +839,7 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: + - {fileID: 793713736} - {fileID: 1874034109} - {fileID: 637982} - {fileID: 1788233993} @@ -769,7 +848,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -627.9} + m_AnchoredPosition: {x: 0, y: -144.8} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &453447295 @@ -803,7 +882,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: 'Shooting:' + m_Text: Controls --- !u!222 &453447296 CanvasRenderer: m_ObjectHideFlags: 0 @@ -812,6 +891,83 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 453447293} m_CullTransparentMesh: 0 +--- !u!1 &517482452 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 517482453} + - component: {fileID: 517482455} + - component: {fileID: 517482454} + m_Layer: 5 + m_Name: Shooting (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &517482453 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 517482452} + 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: 1815080235} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -82.1} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &517482454 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 517482452} + 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: 50 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: '''Flyer'' - 10 health' +--- !u!222 &517482455 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 517482452} + m_CullTransparentMesh: 0 --- !u!1 &529826142 GameObject: m_ObjectHideFlags: 0 @@ -880,7 +1036,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: '''lightning'' - firerate & speed' + m_Text: '''lightning'' - firerate/speed' --- !u!222 &529826145 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1418,6 +1574,116 @@ Transform: m_Father: {fileID: 852977240} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &746772123 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 746772124} + m_Layer: 0 + m_Name: GameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &746772124 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 746772123} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.2243261, y: 10.688588, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1200935774} + - {fileID: 1441504043} + - {fileID: 1343346218} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &793713735 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 793713736} + - component: {fileID: 793713738} + - component: {fileID: 793713737} + m_Layer: 5 + m_Name: ASWD + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &793713736 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 793713735} + 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: 453447294} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -31.5} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &793713737 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 793713735} + 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: 50 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: '''ASWD'' - Movement' +--- !u!222 &793713738 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 793713735} + m_CullTransparentMesh: 0 --- !u!1 &852977239 GameObject: m_ObjectHideFlags: 0 @@ -1449,8 +1715,85 @@ Transform: - {fileID: 1748514802} - {fileID: 745307569} m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &853745213 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 853745214} + - component: {fileID: 853745216} + - component: {fileID: 853745215} + m_Layer: 5 + m_Name: Shooting (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &853745214 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 853745213} + 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: 1815080235} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -103.3} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &853745215 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 853745213} + 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: 50 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: '''Boss'' - ????' +--- !u!222 &853745216 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 853745213} + m_CullTransparentMesh: 0 --- !u!1 &918084477 GameObject: m_ObjectHideFlags: 0 @@ -1620,6 +1963,83 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &1041226635 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1041226636} + - component: {fileID: 1041226638} + - component: {fileID: 1041226637} + m_Layer: 5 + m_Name: Shooting (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1041226636 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1041226635} + 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: 1815080235} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -56.95} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1041226637 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1041226635} + 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: 1 + m_MaxSize: 50 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: '''UFO'' - 10 health' +--- !u!222 &1041226638 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1041226635} + m_CullTransparentMesh: 0 --- !u!1 &1172212686 GameObject: m_ObjectHideFlags: 0 @@ -1881,12 +2301,62 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1200935772} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 1.2243261, y: -10.688588, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 + m_Father: {fileID: 746772124} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1343346217 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1343346218} + - component: {fileID: 1343346219} + m_Layer: 0 + m_Name: Game Controller (Boss) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1343346218 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1343346217} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.2243261, y: -10.688588, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 746772124} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1343346219 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1343346217} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dcd55d3a0e32a2c4ead8688b34f12b5d, type: 3} + m_Name: + m_EditorClassIdentifier: + hazard_BOSS: {fileID: 5435074586135439926, guid: f24d2a605ceb07843bfb6797b4a46b86, + type: 3} + spawnValues_BOSS: {x: 1, y: 15} + hazardCount_BOSS: 0 + spawnWait_BOSS: 0 + startWait_BOSS: 0 + waveWait_BOSS: 0 --- !u!1 &1379383718 GameObject: m_ObjectHideFlags: 0 @@ -1926,7 +2396,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 777.36, y: -605.2} + m_AnchoredPosition: {x: 0, y: -282.8} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &1379383720 @@ -2108,7 +2578,7 @@ GameObject: - component: {fileID: 1441504043} - component: {fileID: 1441504042} m_Layer: 0 - m_Name: Game Controller (1) + m_Name: Game Controller (UFO) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2141,11 +2611,11 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1441504041} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 1.2243261, y: -10.688588, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 + m_Father: {fileID: 746772124} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1641763989 GameObject: @@ -2257,7 +2727,7 @@ Transform: - {fileID: 1382788301} - {fileID: 2101209408} m_Father: {fileID: 0} - m_RootOrder: 9 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1671016380 GameObject: @@ -2459,7 +2929,7 @@ RectTransform: m_Children: - {fileID: 29912843} m_Father: {fileID: 0} - m_RootOrder: 7 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -2740,11 +3210,11 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 453447294} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -100} + m_AnchoredPosition: {x: 0, y: -99.4} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &1788233994 @@ -2767,7 +3237,7 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 25 + m_FontSize: 20 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 2 @@ -2778,7 +3248,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: '''E'' - Beam' + m_Text: '''E'' - Beam (15pt)' --- !u!222 &1788233995 CanvasRenderer: m_ObjectHideFlags: 0 @@ -2787,6 +3257,87 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1788233992} m_CullTransparentMesh: 0 +--- !u!1 &1815080234 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1815080235} + - component: {fileID: 1815080237} + - component: {fileID: 1815080236} + m_Layer: 5 + m_Name: Enemies + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1815080235 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1815080234} + 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: 29916360} + - {fileID: 1041226636} + - {fileID: 517482453} + - {fileID: 853745214} + m_Father: {fileID: 19546990} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -468.3} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1815080236 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1815080234} + 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: 0.56101495, g: 0.003921565, b: 0.78431374, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 50 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: 'Enemies:' +--- !u!222 &1815080237 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1815080234} + m_CullTransparentMesh: 0 --- !u!1 &1874034108 GameObject: m_ObjectHideFlags: 0 @@ -2817,11 +3368,11 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 453447294} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -31.2} + m_AnchoredPosition: {x: 0, y: -53.6} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &1874034110 @@ -2844,7 +3395,7 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 25 + m_FontSize: 20 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 2 @@ -2855,7 +3406,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: '''Space'' - Light' + m_Text: '''Space'' - Light (1pt)' --- !u!222 &1874034111 CanvasRenderer: m_ObjectHideFlags: 0 @@ -3096,5 +3647,5 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 8 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/SpaceShooter/Assets/Scripts/DestroyByContact_BOSS.cs b/SpaceShooter/Assets/Scripts/DestroyByContact_BOSS.cs deleted file mode 100644 index c1a9849..0000000 --- a/SpaceShooter/Assets/Scripts/DestroyByContact_BOSS.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class DestroyByContact_BOSS : MonoBehaviour -{ - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/SpaceShooter/Assets/Scripts/Enemy Game Controllers.meta b/SpaceShooter/Assets/Scripts/Enemy Game Controllers.meta new file mode 100644 index 0000000..cb7c52c --- /dev/null +++ b/SpaceShooter/Assets/Scripts/Enemy Game Controllers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec83193cfbf14254d8ba4d6439e73698 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/SpaceShooter/Assets/Scripts/DestroyByContact.cs b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact.cs similarity index 100% rename from SpaceShooter/Assets/Scripts/DestroyByContact.cs rename to SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact.cs diff --git a/SpaceShooter/Assets/Scripts/DestroyByContact.cs.meta b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact.cs.meta similarity index 100% rename from SpaceShooter/Assets/Scripts/DestroyByContact.cs.meta rename to SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact.cs.meta diff --git a/SpaceShooter/Assets/Scripts/DestroyByContact_1.cs b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_1.cs similarity index 100% rename from SpaceShooter/Assets/Scripts/DestroyByContact_1.cs rename to SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_1.cs diff --git a/SpaceShooter/Assets/Scripts/DestroyByContact_1.cs.meta b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_1.cs.meta similarity index 100% rename from SpaceShooter/Assets/Scripts/DestroyByContact_1.cs.meta rename to SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_1.cs.meta diff --git a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_BOSS.cs b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_BOSS.cs new file mode 100644 index 0000000..20c973b --- /dev/null +++ b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_BOSS.cs @@ -0,0 +1,75 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + + +public class DestroyByContact_BOSS : MonoBehaviour + +{ + + public float health_2 = 500; + + public void Update() + { + if (health_2 < 1) + { + Destroy(gameObject); + } + } + + + void OnTriggerEnter2D(Collider2D other) + { + + if (other.tag == "Boundary") + { + return; + } + + if (other.tag == "Asteroid") + { + return; + } + + if (other.tag == "Enemy1") + { + return; + } + + if (other.tag == "Ship") + { + HealthScript.healthValue = HealthScript.healthValue - 1000; + other.gameObject.SetActive(true); + Destroy(gameObject); + + if (HealthScript.healthValue < 1) + { + other.gameObject.SetActive(false); + Time.timeScale = 0f; + } + } + + if (other.tag == "Shot") + { + ScoreScript.scoreValue += 1; + Destroy(other.gameObject); + health_2 = health_2 - 1; + } + + if (other.tag == "Shot_2") + { + ScoreScript.scoreValue += 5; + Destroy(other.gameObject); + health_2 = health_2 - 5; + } + + if (other.tag == "Shot_3") + { + ScoreScript.scoreValue += 5; + Destroy(other.gameObject); + health_2 = health_2 - 15; + } + + } +} \ No newline at end of file diff --git a/SpaceShooter/Assets/Scripts/DestroyByContact_BOSS.cs.meta b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_BOSS.cs.meta similarity index 100% rename from SpaceShooter/Assets/Scripts/DestroyByContact_BOSS.cs.meta rename to SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_BOSS.cs.meta diff --git a/SpaceShooter/Assets/Scripts/GameController.cs b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController.cs similarity index 100% rename from SpaceShooter/Assets/Scripts/GameController.cs rename to SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController.cs diff --git a/SpaceShooter/Assets/Scripts/GameController.cs.meta b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController.cs.meta similarity index 100% rename from SpaceShooter/Assets/Scripts/GameController.cs.meta rename to SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController.cs.meta diff --git a/SpaceShooter/Assets/Scripts/GameController_1.cs b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_1.cs similarity index 100% rename from SpaceShooter/Assets/Scripts/GameController_1.cs rename to SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_1.cs diff --git a/SpaceShooter/Assets/Scripts/GameController_1.cs.meta b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_1.cs.meta similarity index 100% rename from SpaceShooter/Assets/Scripts/GameController_1.cs.meta rename to SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_1.cs.meta diff --git a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_Boss.cs b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_Boss.cs new file mode 100644 index 0000000..26feed6 --- /dev/null +++ b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_Boss.cs @@ -0,0 +1,61 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class GameController_Boss : MonoBehaviour +{ + public GameObject hazard_BOSS; + public Vector2 spawnValues_BOSS; + public int hazardCount_BOSS; + public float spawnWait_BOSS; + public float startWait_BOSS; + public float waveWait_BOSS; + + + + void Start() + { + StartCoroutine(SpawnWaves()); + } + + IEnumerator SpawnWaves() + { + yield return new WaitForSeconds(startWait_BOSS); + while (true) + { + for (int i = 0; i < hazardCount_BOSS; i++) + { + Vector2 spawnPosition = new Vector2(Random.Range(-spawnValues_BOSS.x, spawnValues_BOSS.x), spawnValues_BOSS.y); + Quaternion spawnRotation = Quaternion.identity; + Instantiate(hazard_BOSS, spawnPosition, spawnRotation); + yield return new WaitForSeconds(spawnWait_BOSS); + } + yield return new WaitForSeconds(waveWait_BOSS); + } + } + + //By level UFO Update + void Update() + { + + if (ScoreScript.scoreValue < 900) + { + hazardCount_BOSS = 0; + spawnWait_BOSS = 0; + waveWait_BOSS = 0; + } + + if (ScoreScript.scoreValue >= 900) + { + hazardCount_BOSS = 1; + spawnWait_BOSS = .10f; + waveWait_BOSS = 0; + } + + } + + + + +} + diff --git a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_Boss.cs.meta b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_Boss.cs.meta new file mode 100644 index 0000000..0af15b6 --- /dev/null +++ b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_Boss.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dcd55d3a0e32a2c4ead8688b34f12b5d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: