SHARE
TWEET

Untitled

a guest Feb 20th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class serpiente : MonoBehaviour {
  6.  
  7.     public GameObject bloque;
  8.     public GameObject escenario;
  9.     public int ancho, alto;
  10.  
  11.     private void Awake()
  12.     {
  13.         crearmuros();
  14.     }
  15.  
  16.     private void crearmuros()
  17.     {
  18.         for(int x=0; x<ancho; x++)
  19.         {
  20.             for(int y=0; y>alto; y++)
  21.             {
  22.                 Vector3 posicion = new Vector3(x, y);
  23.                 Instantiate(bloque, posicion, Quaternion.identity, escenario.transform);
  24.             }
  25.         }
  26.     }
  27. }
  28. using System.Collections;
  29. using System.Collections.Generic;
  30. using UnityEngine;
  31.  
  32. public class serpiente : MonoBehaviour {
  33.  
  34.     public GameObject bloque;
  35.     public GameObject escenario;
  36.     public int ancho, alto;
  37.  
  38.     private void Awake()
  39.     {
  40.         crearmuros();
  41.     }
  42.  
  43.     private void crearmuros()
  44.     {
  45.         for(int x=0; x<ancho; x++)
  46.         {
  47.             for(int y=0; y>alto; y++)
  48.             {
  49.                 Vector3 posicion = new Vector3(x, y);
  50.                 Instantiate(bloque, posicion, Quaternion.identity, escenario.transform);
  51.             }
  52.         }
  53.     }
  54. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top