Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Game Functioning
Updated spawn rate
  • Loading branch information
aps16104 committed Feb 26, 2020
1 parent 43b635f commit f458da1
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions SpaceShooter/Assets/Scenes/Main.unity
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -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);

Expand Down
Expand Up @@ -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);

Expand Down
Expand Up @@ -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;

}
Expand All @@ -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;
}
}
Expand Down
Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions SpaceShooter/Assets/Scripts/PlayerController.cs
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
Expand Down
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f458da1

Please sign in to comment.