Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Enemies all die, Asteroid not pathed yet
  • Loading branch information
smz11006 committed Nov 10, 2015
1 parent 399042d commit b350d64
Show file tree
Hide file tree
Showing 32 changed files with 138 additions and 6 deletions.
Binary file modified ShipShooter/Assets/Enemies/-Enemy2-RigidBody.prefab
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions ShipShooter/Assets/Enemies/Legosteroid_Enemy.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added ShipShooter/Assets/Legos/Legosteroid.prefab
Binary file not shown.
8 changes: 8 additions & 0 deletions ShipShooter/Assets/Legos/Legosteroid.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified ShipShooter/Assets/Scenes/GameScene.unity
Binary file not shown.
2 changes: 1 addition & 1 deletion ShipShooter/Assets/Scripts/Enemy2.cs
Expand Up @@ -25,7 +25,7 @@ public class Enemy2 : MonoBehaviour {
{
if (collision.gameObject.tag == "Bullet")
{
Destroy(gameObject);
health = health - 1;

}
}
Expand Down
9 changes: 9 additions & 0 deletions ShipShooter/Assets/Scripts/EnemySpawner.cs
Expand Up @@ -142,6 +142,15 @@ public class EnemySpawner : MonoBehaviour {
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");
Expand Down
50 changes: 45 additions & 5 deletions ShipShooter/Assets/Scripts/Legosteroid.cs
Expand Up @@ -3,9 +3,49 @@ using System.Collections;

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);
}
}
20 changes: 20 additions & 0 deletions ShipShooter/Assets/Scripts/LegosteroidSpawner.cs
@@ -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 () {

}
}
12 changes: 12 additions & 0 deletions ShipShooter/Assets/Scripts/LegosteroidSpawner.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions ShipShooter/Assets/Scripts/OnDestroy.cs
@@ -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 () {

}
}
12 changes: 12 additions & 0 deletions ShipShooter/Assets/Scripts/OnDestroy.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified ShipShooter/Library/CurrentLayout.dwlt
Binary file not shown.
Binary file not shown.
Binary file modified ShipShooter/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
Binary file not shown.
2 changes: 2 additions & 0 deletions ShipShooter/Library/ScriptAssemblies/BuiltinAssemblies.stamp
@@ -0,0 +1,2 @@
0000.56264290.0000
0000.562642ae.0000
Binary file modified ShipShooter/Library/assetDatabase3
Binary file not shown.
Binary file modified ShipShooter/Library/expandedItems
Binary file not shown.
Binary file modified ShipShooter/Library/metadata/00/00000000000000004000000000000000
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified ShipShooter/Library/metadata/59/5906a6a77aa99d442a84c7cffa7b6507
Binary file not shown.
Binary file modified ShipShooter/Library/metadata/66/664b40cee94497647a1815c7bd525a6c
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 modified ShipShooter/Library/metadata/f7/f7772ef56e6010145ace7cd4ac93f07d
Binary file not shown.
2 changes: 2 additions & 0 deletions ShipShooter/ShipShooter.CSharp.csproj
Expand Up @@ -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" />
Expand Down

0 comments on commit b350d64

Please sign in to comment.