Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //****** Donations are greatly appreciated. ******
- //****** You can donate directly to Jesse through paypal at https://www.paypal.me/JEtzler ******
- var block1 : GameObject;
- var worldWidth : uint = 100;
- var worldHeight : uint = 100;
- var spawnSpeed : float = 1;
- function Start () {
- CreateWorld();
- }
- function Update () {
- }
- function CreateWorld() {
- yield WaitForSeconds(spawnSpeed);
- for(var x : uint =0; x<worldWidth; x+=10) {
- yield WaitForSeconds(spawnSpeed);
- for(var z : uint =0; z<worldHeight; z+=10) {
- yield WaitForSeconds(spawnSpeed);
- var block = Instantiate(block1);
- block.transform.position = new Vector3(this.transform.position.x + x, this.transform.position.y, this.transform.position.z + z);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement