From f458da139e8604a1d4d08dbd25e7e38a7f0e008c Mon Sep 17 00:00:00 2001 From: Adam P Skawinski Date: Tue, 25 Feb 2020 19:22:11 -0500 Subject: [PATCH] Game Functioning Updated spawn rate --- SpaceShooter/Assets/Scenes/Main.unity | 16 ++++++++-------- .../Enemy Game Controllers/DestroyByContact.cs | 2 +- .../Enemy Game Controllers/DestroyByContact_1.cs | 2 +- .../Enemy Game Controllers/GameController.cs | 8 ++++---- .../Enemy Game Controllers/GameController_1.cs | 2 +- SpaceShooter/Assets/Scripts/PlayerController.cs | 8 ++++---- .../Backgrounds/Materials/fx_bolt_boss.mat | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/SpaceShooter/Assets/Scenes/Main.unity b/SpaceShooter/Assets/Scenes/Main.unity index c0b2537..689b4f8 100644 --- a/SpaceShooter/Assets/Scenes/Main.unity +++ b/SpaceShooter/Assets/Scenes/Main.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} + m_IndirectSpecularColor: {r: 0.3731193, g: 0.38073996, b: 0.3587269, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -223,7 +223,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: -2.2000122, y: -7} + m_AnchoredPosition: {x: -2.1999512, y: -7} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &9615814 @@ -513,7 +513,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: '''Asteroid'' - 1 health' + m_Text: '''Asteroid'' - 15 damage' --- !u!222 &29916362 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1226,7 +1226,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: 773.3, y: -61.07} + m_AnchoredPosition: {x: 773.1, y: -61.07} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &642729832 @@ -1365,7 +1365,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: 774.28, y: -29.67} + m_AnchoredPosition: {x: 773, y: -29.67} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &689181781 @@ -1598,7 +1598,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: '''ASWD'' - Movement' + m_Text: '''WASD'' - Movement' --- !u!222 &793713738 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1752,7 +1752,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: 775, y: 0} + m_AnchoredPosition: {x: 773, y: 0} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0, y: 1} --- !u!114 &918084479 @@ -1954,7 +1954,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: '''UFO'' - 10 health' + m_Text: '''UFO'' - 25 damage' --- !u!222 &1041226638 CanvasRenderer: m_ObjectHideFlags: 0 diff --git a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact.cs b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact.cs index 96c3b9d..e471436 100644 --- a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact.cs +++ b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact.cs @@ -18,7 +18,7 @@ public class DestroyByContact : MonoBehaviour if (other.tag == "Ship") { - HealthScript.healthValue = HealthScript.healthValue - 25; + HealthScript.healthValue = HealthScript.healthValue - 15; other.gameObject.SetActive(true); Destroy(gameObject); diff --git a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_1.cs b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_1.cs index 635ae3b..8d6db8f 100644 --- a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_1.cs +++ b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/DestroyByContact_1.cs @@ -34,7 +34,7 @@ public class DestroyByContact_1 : MonoBehaviour if (other.tag == "Ship") { - HealthScript.healthValue = HealthScript.healthValue - 50; + HealthScript.healthValue = HealthScript.healthValue - 25; other.gameObject.SetActive(true); Destroy(gameObject); diff --git a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController.cs b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController.cs index d2cb9ad..1157913 100644 --- a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController.cs +++ b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController.cs @@ -70,8 +70,8 @@ public class GameController : MonoBehaviour if (ScoreScript.scoreValue >= 400 && ScoreScript.scoreValue < 500) { //Asteroid - hazardCount = 15; - spawnWait = .25f; + hazardCount = 10; + spawnWait = .3f; waveWait = 3.5f; } @@ -80,8 +80,8 @@ public class GameController : MonoBehaviour if (ScoreScript.scoreValue >= 500 && ScoreScript.scoreValue < 1000000000) { //Asteroid - hazardCount = 15; - spawnWait = .25f; + hazardCount = 10; + spawnWait = .3f; waveWait = 2.5f; } } diff --git a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_1.cs b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_1.cs index f331a32..42317e1 100644 --- a/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_1.cs +++ b/SpaceShooter/Assets/Scripts/Enemy Game Controllers/GameController_1.cs @@ -105,7 +105,7 @@ public class GameController_1 : MonoBehaviour if (ScoreScript.scoreValue >= 900 ) { - hazardCount_1 = 7; + hazardCount_1 = 6; spawnWait_1 = .40f; waveWait_1 = 7; } diff --git a/SpaceShooter/Assets/Scripts/PlayerController.cs b/SpaceShooter/Assets/Scripts/PlayerController.cs index c08fd89..2fb95e4 100644 --- a/SpaceShooter/Assets/Scripts/PlayerController.cs +++ b/SpaceShooter/Assets/Scripts/PlayerController.cs @@ -59,7 +59,7 @@ public class PlayerController : MonoBehaviour if (other.tag == "Shot_UFO") { - HealthScript.healthValue = HealthScript.healthValue - 5; + HealthScript.healthValue = HealthScript.healthValue - 25; Destroy(other.gameObject); } @@ -95,19 +95,19 @@ public class PlayerController : MonoBehaviour void Update() { - if (Input.GetKeyDown("space") && Time.time > nextFire) + if (Input.GetKey("space") && Time.time > nextFire) { nextFire = Time.time + fireRate; Instantiate(shot, shotSpawn.position, shotSpawn.rotation); } - if (Input.GetKeyDown("q") && Time.time > nextFire_2) + if (Input.GetKey("q") && Time.time > nextFire_2) { nextFire_2 = Time.time + fireRate_2; Instantiate(shot_2, shotSpawn_2.position, shotSpawn_2.rotation); } - if (Input.GetKeyDown("e") && Time.time > nextFire_3) + if (Input.GetKey("e") && Time.time > nextFire_3) { nextFire_3 = Time.time + fireRate_3; Instantiate(shot_3, shotSpawn_3.position, shotSpawn_3.rotation); diff --git a/SpaceShooter/Assets/SpaceShooterRedux (1)/Backgrounds/Materials/fx_bolt_boss.mat b/SpaceShooter/Assets/SpaceShooterRedux (1)/Backgrounds/Materials/fx_bolt_boss.mat index ab55ed4..77ff79d 100644 --- a/SpaceShooter/Assets/SpaceShooterRedux (1)/Backgrounds/Materials/fx_bolt_boss.mat +++ b/SpaceShooter/Assets/SpaceShooterRedux (1)/Backgrounds/Materials/fx_bolt_boss.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: fx_bolt_boss - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 @@ -40,7 +40,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: a2cfb61a29785f94c9c8e52589625289, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: