コード例 #1
0
//	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();
    }
コード例 #2
0
ファイル: SlotForAns2.cs プロジェクト: njiajia/BOTNET
	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();
	}
コード例 #3
0
ファイル: SlotForAns2.cs プロジェクト: njiajia/BOTNET
	public void P2WrongAttack(){
		//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();
	}
コード例 #4
0
    public void correctAttack()
    {
//		gamesql.timer = 1f;
        //add one point
        scoreCount.correct();

        //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();

        gamesql.activation();
    }