Skip to content
Permalink
Browse files

Spawner - Got spawning on the while loop done. Infinispawn

  • Loading branch information
smz11006 committed Oct 26, 2015
1 parent 797639e commit 732eba5b3af016bb209cc9a72029d5f5cbfc90a8
@@ -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 () {

}

@@ -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!");
}
}
}

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

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.
BIN +768 Bytes (120%) Week 8 Project/Library/expandedItems
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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

0 comments on commit 732eba5

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