// public void submit(){ // // y = ansslot.GetComponentInChildren<Text> ().text ; // //Debug.Log (ansslot.GetComponentInChildren<Text> ().text); // // if (y == gamesql.checker) { // correctAttack (); // } else { // wrongAttack(); // } // // } public void wrongAttack() { // gamesql.timer = 1f; //Fire when option is choosen. missile = missile.GetComponent <Missile> (); source.PlayOneShot(fly); missile.createShot(); resetOpt = resetOpt.GetComponent <ResetOption> (); resetOpt.reset(); gamesql.activation(); }
/*------------------------------------PLAYER1 ATTACK--------------------------------------------------------*/ public void P1CorrectAttack(){ //Fire when option is choosen. fireBall = fireBall.GetComponent<FireBall> (); source.PlayOneShot(fireballsound); fireBall.createShot (); //reset the options back to original place. resetOpt = resetOpt.GetComponent<ResetOption> (); resetOpt.reset (); resetOpt2 = resetOpt.GetComponent<ResetOption2> (); resetOpt2.reset (); gamesqlM.activation(); }
public void P1WrongAttack(){ //Fire when option is choosen. missile = missile.GetComponent<Missile> (); source.PlayOneShot(fly); missile.createShot (); //reset the options back to original place. resetOpt = resetOpt.GetComponent<ResetOption> (); resetOpt.reset (); resetOpt2 = resetOpt.GetComponent<ResetOption2> (); resetOpt2.reset (); gamesqlM.activation(); }