Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetButtonDown("Fire1"))
     {
         if (grid.CanPlace(targetPixelRow, targetPixelColumn))
         {
             grid.Place(targetPixelRow, targetPixelColumn, (GameObject)Instantiate(actualPixel));
             audio.Play();
             game.AddScore(1);
         }
     }
 }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetButtonDown("Fire1"))
     {
         if (grid.CanPlace(targetPixelRow, targetPixelColumn))
         {
             Transform t = grid.Place(targetPixelRow, targetPixelColumn, (GameObject)Instantiate(actualPixel));
             audio.Play();
             game.AddScore(1);
             particleSystem.gameObject.transform.position = t.position;
             particleSystem.gameObject.SetActive(true);
             particleSystem.Play();
         }
     }
 }