Skip to content
Permalink
Browse files

Enemies all die, Asteroid not pathed yet

  • Loading branch information
smz11006 committed Nov 10, 2015
1 parent 399042d commit b350d64c75f9e33525e82fba3bef68b60928e022
Showing with 138 additions and 6 deletions.
  1. BIN ShipShooter/Assets/Enemies/-Enemy2-RigidBody.prefab
  2. BIN ShipShooter/Assets/Enemies/Legosteroid_Enemy.prefab
  3. +8 −0 ShipShooter/Assets/Enemies/Legosteroid_Enemy.prefab.meta
  4. BIN ShipShooter/Assets/Legos/Legosteroid.prefab
  5. +8 −0 ShipShooter/Assets/Legos/Legosteroid.prefab.meta
  6. BIN ShipShooter/Assets/Scenes/GameScene.unity
  7. +1 −1 ShipShooter/Assets/Scripts/Enemy2.cs
  8. +9 −0 ShipShooter/Assets/Scripts/EnemySpawner.cs
  9. +45 −5 ShipShooter/Assets/Scripts/Legosteroid.cs
  10. +20 −0 ShipShooter/Assets/Scripts/LegosteroidSpawner.cs
  11. +12 −0 ShipShooter/Assets/Scripts/LegosteroidSpawner.cs.meta
  12. +19 −0 ShipShooter/Assets/Scripts/OnDestroy.cs
  13. +12 −0 ShipShooter/Assets/Scripts/OnDestroy.cs.meta
  14. BIN ShipShooter/Library/CurrentLayout.dwlt
  15. BIN ShipShooter/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb
  16. BIN ShipShooter/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
  17. +2 −0 ShipShooter/Library/ScriptAssemblies/BuiltinAssemblies.stamp
  18. BIN ShipShooter/Library/assetDatabase3
  19. BIN ShipShooter/Library/expandedItems
  20. BIN ShipShooter/Library/metadata/00/00000000000000004000000000000000
  21. BIN ShipShooter/Library/metadata/3b/3b675e32b2714ae4c9cbd27c958fdee7
  22. BIN ShipShooter/Library/metadata/3b/3b675e32b2714ae4c9cbd27c958fdee7.info
  23. BIN ShipShooter/Library/metadata/59/5906a6a77aa99d442a84c7cffa7b6507
  24. BIN ShipShooter/Library/metadata/66/664b40cee94497647a1815c7bd525a6c
  25. BIN ShipShooter/Library/metadata/80/80e7573a34a1ac44b9aaffad33cbf596
  26. BIN ShipShooter/Library/metadata/80/80e7573a34a1ac44b9aaffad33cbf596.info
  27. BIN ShipShooter/Library/metadata/9e/9e9ee8d10a3b084429f83f15b563a14d
  28. BIN ShipShooter/Library/metadata/9e/9e9ee8d10a3b084429f83f15b563a14d.info
  29. BIN ShipShooter/Library/metadata/a1/a1b01409c659908498e47d4c104bc39c
  30. BIN ShipShooter/Library/metadata/a1/a1b01409c659908498e47d4c104bc39c.info
  31. BIN ShipShooter/Library/metadata/f7/f7772ef56e6010145ace7cd4ac93f07d
  32. +2 −0 ShipShooter/ShipShooter.CSharp.csproj
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more.

Binary file not shown.

Some generated files are not rendered by default. Learn more.

Binary file not shown.
@@ -25,7 +25,7 @@ void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.tag == "Bullet")
{
Destroy(gameObject);
health = health - 1;

}
}
@@ -142,6 +142,15 @@ IEnumerator EnemySpawn()
MidSpawnEdges();
yield return new WaitForSeconds(2f);

EdgeSpawn();
EdgeSpawnIn();
yield return new WaitForSeconds(2f);

EdgeSpawnLast();
MidSpawnMids();
EdgeSpawnLast();
yield return new WaitForSeconds(2f);



Debug.Log("enumerator Ends");
@@ -3,9 +3,49 @@

public class Legosteroid : MonoBehaviour {

public gameObject legosteroid;
public gameObject piece1;
public gameObject piece2;
public gameObject piece3;
public gameObject piece4;
public GameObject legosteroid;
public GameObject piece1;
public GameObject piece2;
public GameObject piece3;
public GameObject piece4;

public GameObject brick1;
public GameObject brick2;
public GameObject brick3;
public GameObject brick4;

void Awake()
{

}

void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.tag == "Bullet")
{
brick1 = (GameObject)Instantiate(piece1, new Vector3(gameObject.transform.position.x + 1, gameObject.transform.position.y - 2, 5), Quaternion.identity);
brick2 = (GameObject)Instantiate(piece2, new Vector3(gameObject.transform.position.x - 2, gameObject.transform.position.y + 1, 5), Quaternion.identity);
brick3 = (GameObject)Instantiate(piece3, new Vector3(gameObject.transform.position.x - 1.4f, gameObject.transform.position.y + 2, 5), Quaternion.identity);
brick4 = (GameObject)Instantiate(piece4, new Vector3(gameObject.transform.position.x + 3, gameObject.transform.position.y + 1, 5), Quaternion.identity);

iTween.MoveTo(brick1, new Vector3(brick1.transform.position.x + 20, brick1.transform.position.y - 17, 5), 10);
iTween.MoveTo(brick2, new Vector3(brick1.transform.position.x - 22, brick1.transform.position.y + 35, 5), 10);
iTween.MoveTo(brick3, new Vector3(brick1.transform.position.x - 35, brick1.transform.position.y - 22, 5), 10);
iTween.MoveTo(brick4, new Vector3(brick1.transform.position.x + 40, brick1.transform.position.y + 20, 5), 10);
Destroy(gameObject);
}
if (brick1.transform.position.z != 5)
brick1.transform.position = new Vector3(brick1.transform.position.x, brick1.transform.position.y, 5);
if (brick2.transform.position.z != 5)
brick2.transform.position = new Vector3(brick2.transform.position.x, brick2.transform.position.y, 5);
if (brick3.transform.position.z != 5)
brick3.transform.position = new Vector3(brick3.transform.position.x, brick3.transform.position.y, 5);
if (brick4.transform.position.z != 5)
brick4.transform.position = new Vector3(brick4.transform.position.x, brick4.transform.position.y, 5);
}

void Update()
{
gameObject.transform.eulerAngles = new Vector3(gameObject.transform.eulerAngles.x + 5, gameObject.transform.eulerAngles.y, gameObject.transform.eulerAngles.z);
}
}
@@ -0,0 +1,20 @@
using UnityEngine;
using System.Collections;

public class LegosteroidSpawner : MonoBehaviour {

// Use this for initialization
void Start () {

}

IEnumerator AsteroidSpawn()
{
yield return new WaitForSeconds(0.2f);
}

// Update is called once per frame
void Update () {

}
}

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,19 @@
using UnityEngine;
using System.Collections;

public class OnDestroy : MonoBehaviour {


void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.tag == "Bullet")
{
Destroy(gameObject);

}
}
// Update is called once per frame
void Update () {

}
}

Some generated files are not rendered by default. Learn more.

Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
0000.56264290.0000
0000.562642ae.0000
Binary file not shown.
BIN +72 Bytes (100%) ShipShooter/Library/expandedItems
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -74,6 +74,8 @@
<Compile Include="Assets\Scripts\Enemy2.cs" />
<Compile Include="Assets\Scripts\EnemySpawner.cs" />
<Compile Include="Assets\Scripts\Legosteroid.cs" />
<Compile Include="Assets\Scripts\LegosteroidSpawner.cs" />
<Compile Include="Assets\Scripts\OnDestroy.cs" />
<Compile Include="Assets\Scripts\PlayerControls.cs" />
<Compile Include="Assets\Scripts\PlayerHealth.cs" />
<Compile Include="Assets\iTweenEditor\Examples\StartAndStopTween.cs" />

0 comments on commit b350d64

Please sign in to comment.
You can’t perform that action at this time.