public void OnButtonReleased( Vuforia.VirtualButtonAbstractBehaviour vb) { //Sphere.GetComponent<Renderer>().enabled = true; print ("pressout"); if (vb.name == "VirtualButton1") { //Sphere.GetComponent<Renderer>().material.color= Color.white; //change color print ("C");} if (vb.name == "VirtualButton2") { Sphere.GetComponent<Renderer>().material.color= Color.white; //change color print ("D");} print("button released, invalidating timer"); InvalidateTimer(); }
public void OnButtonPressed( Vuforia.VirtualButtonAbstractBehaviour vb) { print ("press");print ("vivian"); if (vb.name == "VirtualButton1") { print ("A");} if (vb.name == "VirtualButton2") { print ("B");} print("button pressed, starting timer"); StartTimer(2.0f); }
public void OnButtonPressed( Vuforia.VirtualButtonAbstractBehaviour vb) { print ("press");print ("vivian"); if (vb.name == "VirtualButton 1") { Sphere.GetComponent<Renderer>().enabled = false; //Sphere.GetComponent<Renderer>().material.color= Color.red; //change color to red //Sphere.transform.position += new Vector3 (5.0f , 0.0f, 0.0f); //move object print ("A");} if (vb.name == "VirtualButton2") { Sphere.GetComponent<Renderer>().enabled = true; //Sphere.GetComponent<Renderer>().material.color= Color.blue; //change color to blue //Sphere.transform.position -= new Vector3 (5.0f , 0.0f, 0.0f); //move object print ("B");} print("button pressed, starting timer"); StartTimer(2.0f); }
public void OnButtonReleased( Vuforia.VirtualButtonAbstractBehaviour vb) { if (control_ImageTarget3.turn == 1 && control_ImageTarget3.char_1_loc == 8 || control_ImageTarget3.turn == 2 && control_ImageTarget3.char_2_loc == 8 || control_ImageTarget3.turn == 3 && control_ImageTarget3.char_3_loc == 8) { print ("pressout"); if (vb.name == "VirtualButton1") { print ("C"); } if (vb.name == "VirtualButton2") { print ("D"); } print ("button released, invalidating timer"); InvalidateTimer (); } }
public void OnButtonPressed( Vuforia.VirtualButtonAbstractBehaviour vb) { if (control_ImageTarget3.turn == 1 && control_ImageTarget3.char_1_loc == 8 || control_ImageTarget3.turn == 2 && control_ImageTarget3.char_2_loc == 8 || control_ImageTarget3.turn == 3 && control_ImageTarget3.char_3_loc == 8) { if (vb.name == "VirtualButton1") { print ("A"); print ("button pressed, starting timer"); StartTimer (2.0f); } if (vb.name == "VirtualButton2") { Sphere.GetComponent<MeshRenderer> ().enabled = true; Sphere.transform.position = new Vector3 (-444.0f, 0.0f, 0.0f); if (control_ImageTarget3.turn == 1) { ball.GetComponent<Renderer> ().material.color = Color.red; // control_ImageTarget3.char_1_money -= control_ImageTarget3.h_price_8; control_ImageTarget3.o_house_8 = 1; control_ImageTarget3.h_price_8 += 500;//house price increase } else if (control_ImageTarget3.turn == 2) { ball.GetComponent<Renderer> ().material.color = Color.blue; // control_ImageTarget3.char_2_money -= control_ImageTarget3.h_price_8; control_ImageTarget3.o_house_8 = 2; control_ImageTarget3.h_price_8 += 500;//house price increase } else { ball.GetComponent<Renderer> ().material.color = Color.yellow; // control_ImageTarget3.char_3_money -= control_ImageTarget3.h_price_8; control_ImageTarget3.o_house_8 = 3; control_ImageTarget3.h_price_8 += 500;//house price increase } print ("B"); } //print ("button pressed, starting timer"); //StartTimer (2.0f); } }
public void OnButtonPressed( Vuforia.VirtualButtonAbstractBehaviour vb) { if (turn == 1 && char_1_loc == 3 || turn == 2 && char_2_loc == 3 || turn == 3 && char_3_loc == 3) { if (vb.name == "VirtualButton1") { //pay money when end your turn print ("button pressed, starting timer"); StartTimer (2.0f); print ("A"); } if (vb.name == "VirtualButton2") {//buy Sphere.GetComponent<MeshRenderer> ().enabled = true; Sphere.transform.position = new Vector3 (0.0f, 0.0f, 0.0f); if (turn == 1) { ball.GetComponent<Renderer> ().material.color = Color.red; char_1_money -= h_price_3; o_house_3 = 1; h_price_3 += 500;//house price increase } else if (turn == 2) { ball.GetComponent<Renderer> ().material.color = Color.blue; char_2_money -= h_price_3; o_house_3 = 2; h_price_3 += 500; } else { ball.GetComponent<Renderer> ().material.color = Color.yellow; char_3_money -= h_price_3; o_house_3 = 3; h_price_3 += 500; } print ("B"); } } }
public void OnButtonReleased( Vuforia.VirtualButtonAbstractBehaviour vb) { }
public void OnButtonPressed( Vuforia.VirtualButtonAbstractBehaviour vb) { print ("pressout"); press = true; }
public void OnButtonReleased(Vuforia.VirtualButtonAbstractBehaviour vb) { print ("press2"); }