示例#1
0
文件: Wand.cs 项目: feefles/ese350
	void VolumeRecognize(Instrument instrument) {
		Gesture curGest = GestureRecognize ();
		if (curGest == Gesture.UP) {
			instrument.VolumeUp (4.0f);
			Debug.Log ("volume up" + instrument.myInstrument);
			timeOfLastAction[(int)Action.CRESCENDO] = Time.time;
			payloadOfLastAction[(int)Action.CRESCENDO] = (int)instrument.myInstrument;
		} else if (curGest == Gesture.DOWN) {
			instrument.VolumeDown(4.0f);
			Debug.Log ("volume down");
			timeOfLastAction[(int)Action.DECRESCENDO] = Time.time;
			payloadOfLastAction[(int)Action.DECRESCENDO] = (int)instrument.myInstrument;
		}
			
		
	}