Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Spawner - Got spawning on the while loop done. Infinispawn
  • Loading branch information
smz11006 committed Oct 26, 2015
1 parent 797639e commit 732eba5
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 15 deletions.
57 changes: 45 additions & 12 deletions Week 8 Project/Assets/SPawner.cs
Expand Up @@ -2,13 +2,44 @@
using System.Collections;

public class SPawner : MonoBehaviour {
//Digital
public GameObject digitalBlock;

public int ballCount = 0;
public int ballCountMax = 10;
public GameObject paddleBall;
//Media
public GameObject mediaBlock;

// Use this for initialization
void Start () {
//and
public GameObject andBlock;

//Design
public GameObject designBlock;

//is
public GameObject isBlock;

//Awesome
public int awesomeECount = 0;
public int awesomeEMax = 12;
public GameObject awesomeBlock;
public Object e01;
GameObject e02;
GameObject e03;
GameObject e04;
GameObject e05;
GameObject e06;
GameObject e07;
GameObject e08;
GameObject e09;
GameObject e10;
GameObject e11;
GameObject e12;
GameObject e13;
GameObject e14;
GameObject e15;
GameObject e16;

// Use this for initialization
void Start () {

}

Expand All @@ -17,18 +48,20 @@ public class SPawner : MonoBehaviour {

}

public void SpawnBall1Wrap()
public void BottomCoroutine()
{
StartCoroutine (SpawnBall1 ());
StartCoroutine (SpawnEBottom());
}

IEnumerator SpawnBall1()
IEnumerator SpawnEBottom()
{
Debug.Log("Button Works");

while (ballCount < ballCountMax) {
Instantiate(paddleBall, new Vector3(transform.position.x, transform.position.y, transform.position.z), Quaternion.identity);
ballCount++;
yield return new WaitForSeconds(4f);
while (awesomeECount < awesomeEMax) {
Instantiate(awesomeBlock, new Vector3(transform.position.x, transform.position.y, transform.position.z), Quaternion.identity);
//iTween.MoveTo(e01, iTween.Hash("path", iTweenPath.GetPath("e0"), "time", 5));
yield return new WaitForSeconds(1f);
Debug.Log("While Work!");
}
}
}
11 changes: 9 additions & 2 deletions Week 8 Project/Assets/SPawner.cs.meta

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

Binary file modified Week 8 Project/Assets/SpawningObjects.unity
Binary file not shown.
Binary file modified Week 8 Project/Library/CurrentLayout.dwlt
Binary file not shown.
Binary file modified Week 8 Project/Library/InspectorExpandedItems.asset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Week 8 Project/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
Binary file not shown.
Binary file modified Week 8 Project/Library/assetDatabase3
Binary file not shown.
Binary file modified Week 8 Project/Library/expandedItems
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Week 8 Project/Week 8 Project.sln
Expand Up @@ -29,7 +29,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-CSharp.csproj
Policies = $0
$0.TextStylePolicy = $1
Expand Down

0 comments on commit 732eba5

Please sign in to comment.