Пример #1
0
 public static void ExtendInputList(ref HandInput.PoseInput[] inputList)
 {
     HandInput.PoseInput[] newInputList = new HandInput.PoseInput[inputList.Length + 1];
     for (int i = 0; i < inputList.Length; i++)
     {
         newInputList[i] = inputList[i];
     }
     inputList = newInputList;
 }
Пример #2
0
 private void SetHandPoseInput(SerializedProperty inputProp, HandInput.PoseInput poseInput, int poseIndex, HandTarget handTarget)
 {
     EditorGUILayout.BeginHorizontal();
     EditorGUI.indentLevel--;
     //poseInput.poseId = (HandPoses.PoseId)EditorGUILayout.EnumPopup(poseInput.poseId, GUILayout.Width(80));
     poseInput.poseId = EditorGUILayout.Popup(poseInput.poseId, handPoseNames, GUILayout.Width(80));
     SetInput(inputProp, poseInput, handTarget.gameObject);
     EditorGUI.indentLevel++;
     EditorGUILayout.EndHorizontal();
 }
Пример #3
0
        public static void CleanupKeyboardInput(ref HandInput.PoseInput[] inputList)
        {
            // assumes exactly 1 None keycode in the list (except the last)
            HandInput.PoseInput[] newInputList = new HandInput.PoseInput[inputList.Length - 1];
            int j = 0;

            for (int i = 0; i < inputList.Length - 1; i++)
            {
                if (inputList[i].poseId != 0)
                {
                    newInputList[j++] = inputList[i];
                }
            }
            newInputList[j] = new HandInput.PoseInput();
            inputList       = newInputList;
        }