本文整理汇总了C#中KinectWrapper.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# KinectWrapper.ToString方法的具体用法?C# KinectWrapper.ToString怎么用?C# KinectWrapper.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KinectWrapper
的用法示例。
在下文中一共展示了KinectWrapper.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GestureComplete
// Invoked when a gesture is complete.
// Return true, if the gesture must be detected again, false otherwise
public bool GestureComplete(uint userId, KinectWrapper.Gestures gesture,
KinectWrapper.SkeletonJoint joint, Vector3 screenPos)
{
string sGestureText = gesture + " detected";
//string ges=gesture.ToString();
//bool gest;
if(
//(!state_right)&&
gesture.ToString().Equals("SweepLeft")){
state_right=true;
print ("SweepRight detected");
player.transform.Rotate(0,-90,0);
status_player=quat_clock*status_player;
}
/*if(!gesture.Equals("SweepLeft")&&state_right){
state_right=false;
print ("state_right converted to false");
}*/
if(//(!state_left)&&
gesture.ToString().Equals("SweepRight")){
state_left=true;
state_right=true;
print ("SweepLeft detected");
player.transform.Rotate(0,90,0);
status_player=quat_anti*status_player;
/*
print ("SweepLeft detected");
player.transform.Rotate(0,90,0);*/
}
if(status_player*size_terrain==status&&state_right){
//print ("enterd in condition 1");
if(status.x!=0){
print ("enterd in condition 1");
if((player.transform.position.z-terrain_array[((index-4)%32+32)%32].transform.position.z)*(player.transform.position.z-terrain_array[((index-1)%32+32)%32].transform.position.z)<0){
print ("initial position="+player.transform.position.ToString());
player.transform.Translate(0,0,(terrain_array[((index-4)%32+32)%32].transform.position.z+terrain_array[((index-1)%32+32)%32].transform.position.z)/2-player.transform.position.z);
print ("final position="+player.transform.position.ToString());
}
}
else if(status.z!=0){
print ("enterd in condition 2");
if((player.transform.position.x-terrain_array[((index-4)%32+32)%32].transform.position.x)*(player.transform.position.x-terrain_array[((index-1)%32+32)%32].transform.position.x)<0){
print ("initial position="+player.transform.position.ToString());
player.transform.Translate((terrain_array[((index-4)%32+32)%32].transform.position.x+terrain_array[((index-1)%32+32)%32].transform.position.x)/2-player.transform.position.z,0,0);
print ("final position="+player.transform.position.ToString());
}
}
state_right=false;
}
/*if(!gesture.Equals("SweepRight")&&state_left){
state_left=false;
print ("state_left converted to false");
}*/
if(gesture == KinectWrapper.Gestures.Click)
sGestureText += string.Format(" at ({0:F1}, {1:F1})", screenPos.x, screenPos.y);
//GestureInfo.guiText.text = sGestureText;
return true;
}