Пример #1
0
	public void onRightHandPositionDetected(object sender, RightHandPositionDetectedEventArgs e)
	{
		switch(e.pos){
		case RightHandPosition.UP: 
			color_buttonBack = Color.green;
			Application.LoadLevel("Menu");
			//Debug.Log("UP detected");
			break;
		case RightHandPosition.MID: 
			//Debug.Log("MID detected");
			break;
		case RightHandPosition.DOWN: 
			//Debug.Log("DOWN detected");
			break;
		default: 
			break;
		}
	}
Пример #2
0
	void onRightHandPositionDetected (object sender, RightHandPositionDetectedEventArgs e){
		switch(e.pos){
			case RightHandPosition.UP: 
				color_buttonHeadTracking = Color.green;
				Application.LoadLevel("HeadTracking");
				//Debug.Log("UP detected");
			break;
			case RightHandPosition.MID: 
				color_buttonStartGame = Color.green;
				Application.LoadLevel("Game");
				//Debug.Log("MID detected");
			break;
			case RightHandPosition.DOWN: 
				color_quitGame = Color.green;
				Application.Quit();
				//Debug.Log("DOWN detected");
			break;
			default: 
			break;
		}
	}
Пример #3
0
	public void onRightHandPositionDetected(object sender, RightHandPositionDetectedEventArgs e)
	{
		if (i_healthPoints > 0) return;

		if (e.pos == RightHandPosition.UP) {
			him.rightHandPositionDetected -= new RightHandPositionDetectedEventHandler(onRightHandPositionDetected);
			Application.LoadLevel("Menu");
		}
		else if(e.pos == RightHandPosition.DOWN){
			// restart game
			go_gameover.SetActive(false);
			i_healthPoints = i_maxHealthPoints;
			i_score = 0;
		}
	}
	// trigger the event handlers
	protected virtual void OnRightHandPositionDetected(RightHandPosition pos) {
		if (rightHandPositionDetected != null) {
			RightHandPositionDetectedEventArgs e = new RightHandPositionDetectedEventArgs();
			e.pos = pos;
			rightHandPositionDetected (this, e);
		}
	}