Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Intro_Scritping/Week 8 Project/Assets/SPawner.cs
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
67 lines (54 sloc)
1.34 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SPawner : MonoBehaviour { | |
//Digital | |
public GameObject digitalBlock; | |
//Media | |
public GameObject mediaBlock; | |
//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 () { | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
public void BottomCoroutine() | |
{ | |
StartCoroutine (SpawnEBottom()); | |
} | |
IEnumerator SpawnEBottom() | |
{ | |
Debug.Log("Button Works"); | |
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!"); | |
} | |
} | |
} |