Unity 3d spawn a prefab

Advertisemen




Unity 3d spawn a prefab





Making free platform game ! One man show
----------------------------------------­­­--------------------------------------­-­-­------------------------------------­----------------
Javascrip: GOOD 4 2D GAMES AND 3D GAMES ! 
----------------------------------------­­­--------------------------------------­-­-­------------------------------------­----------------

var node1 : Transform;
var block : GameObject;
var spawning : boolean = true;

function Start () {
spawnBlock();
}

function Update () {

}

function spawnBlock () {

while(spawning) {
yield WaitForSeconds(1);
Instantiate(block,node1.transform.positi­on,node1.transform.rotation);
}
}




----------------------------------------­----------------------------------------­-

Copyright Free Music in this video by:

Song: Virtual Riot - Energy Drink
» Download:
http://bit.ly/RebornDownload

Creative Commons License
http://creativecommons.org/licenses/b...

--------------------------------------

Artist's Links:
Virtual Riot - Energy Drink

http://www.facebook.com/virtualriotmusic
http://www.soundcloud.com/virtual-riot

Advertisemen

Disclaimer: Gambar, artikel ataupun video yang ada di web ini terkadang berasal dari berbagai sumber media lain. Hak Cipta sepenuhnya dipegang oleh sumber tersebut. Jika ada masalah terkait hal ini, Anda dapat menghubungi kami disini.

Tidak ada komentar:

Posting Komentar

© Copyright 2017 Tutorial Unity 3D