예제 #1
0
 // Use this for initialization
 void Start()
 {
     Destroy(gameObject, 6);
     rb = GetComponent <Rigidbody2D> ();
     rb.AddForce(new Vector2(Random.Range(-500, 500), 100));
     txt_moneda  = GameObject.Find("TextoMoneda");
     ctrl_moneda = txt_moneda.GetComponent <control_monedas> ();
 }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     Destroy(gameObject, 10);
     rb = GetComponent <Rigidbody2D> ();
     rb.AddForce(new Vector2(Random.Range(-0.02f, 0.02f), 0.02f));
     txt_moneda  = GameObject.Find("texto_moneda");
     ctrl_moneda = txt_moneda.GetComponent <control_monedas> ();
 }
예제 #3
0
 void Start()
 {
     Destroy(gameObject, 3);
     rb    = GetComponent <Rigidbody2D> ();
     audio = GetComponent <AudioSource> ();
     rb.AddForce(new Vector2(Random.Range(-100, 100), 100));
     texto_moneda = GameObject.Find("texto_moneda");
     ctrl_moneda  = texto_moneda.GetComponent <control_monedas> ();
 }