Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     for (int y = 0; y < Height; y++)
     {
         for (int x = 0; x < Width; x++)
         {
             if (WebCamManager.checkActivePixel(x, y))
             {
                 Vector3 pos = new Vector3((x - Width / 2), (y - Height / 2), 0) + transform.position;
                 Particle.Emit(pos);
             }
         }
     }
 }
Ejemplo n.º 2
0
 void CollisionGenerate()
 {
     for (int y = 0; y < Height; y++)
     {
         for (int x = 0; x < Width; x++)
         {
             if (WebCamManager.checkActivePixel(x, y))
             {
                 CollisionObject[y * Width + x].SetActive(true);
             }
             else
             {
                 CollisionObject[y * Width + x].SetActive(false);
             }
         }
     }
 }
Ejemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     for (int y = 0; y < Height; y++)
     {
         for (int x = 0; x < Width; x++)
         {
             if (WebCamManager.checkActivePixel(x, y))
             {
                 BoxObject[y * Width + x].transform.localScale = new Vector3(BoxPrefab.transform.localScale.x, BoxPrefab.transform.localScale.y, Level3D);
             }
             else
             {
                 BoxObject[y * Width + x].transform.localScale = BoxPrefab.transform.localScale;
             }
         }
     }
 }