Beispiel #1
0
 void OnMouseDown()
 {
     if (available > 0)
     {
         generated = Instantiate(particle.GetParticleObject());
         generated.GetComponent <ParticleScript>().OnMouseDown();
         generated.transform.position = Camera.main.ScreenToWorldPoint(Input.mousePosition);
         generated.transform.position = new Vector3(generated.transform.position.x, generated.transform.position.y, 0);
         particle.Decrement();
     }
 }