333GameStudio

RandomTile

May 18th, 2015
1,183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var tile : GameObject;
  2. var tile1 : GameObject;
  3.  
  4. function Start () {
  5. Num = Random.Range(1,3);
  6. if(Num == 1){
  7. var spawn =
  8. Instantiate(tile,transform.position,transform.rotation);
  9.  
  10. }
  11.  
  12. else if(Num == 2){
  13. var spawn1 =
  14. Instantiate(tile1,transform.position,transform.rotation);
  15.  
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment