/// <summary> /// /// </summary> public override void OnInspectorGUI() { DrawDefaultInspector(); EditorGUILayout.Separator(); // HandAnimator target_ = target as HandAnimator; m_ShowInEditor = true; //if(EditorApplication.isPlaying){ // m_ShowInEditor=EditorGUILayout.ToggleLeft("Show In Editor",m_ShowInEditor); //} //if(m_ShowInEditor){if(!m_TargetAwake){ //target_.AwakeForEditor();// TODO ??? //m_TargetAwake=true; //}} if (DrawHandGUI("Left", target_.leftGesture) || DrawHandGUI("Right", target_.rightGesture)) { if (m_ShowInEditor) { target_.hands[HandControllerBase.k_LeftHand].SetGesture(target_.leftGesture); target_.hands[HandControllerBase.k_RightHand].SetGesture(target_.rightGesture); } } }
/// <summary> /// /// </summary> public HandControllerBase( HandAnimator i_animator, int i_handType, HandBones i_handId ) { // animator = i_animator; handType = i_handType; handId = i_handId; // fingers = new HandFinger[5]; }
/// <summary> /// /// </summary> public HandFinger( HandAnimator i_animator, int i_fingerId, HandBones i_boneId, int i_num = 3 ) { animator = i_animator; fingerId = i_fingerId; joints = new HandJoint[i_num]; m_NumJoints = 0; for (; m_NumJoints < i_num; ++m_NumJoints) { joints[m_NumJoints] = animator.joints[i_boneId + m_NumJoints]; } }