Beispiel #1
0
 private void InitEvent()
 {
     GestureInput.OnClick.AddListener(() =>
     {
         Recovery();
         setGesturePanel.gestureWindows.SetPanel(gesture, setGesturePanel);
     });
     EventInput.OnClick.AddListener(() =>
     {
         Recovery();
         setGesturePanel.eventWindows.SetPanel(gesture);
     });
     Remove.OnClick.AddListener(() =>
     {
         Recovery();
         setGesturePanel.RemoveGesture(gesture);
     });
 }
Beispiel #2
0
        private void InitEvent()
        {
            //录入信息按钮事件添加
            intoEntry.OnClick.AddListener(() =>
            {
                PlayerGestureManager.Instance.SetGestureJointData(PlayerGestureInfo.GestureType.End, gesture.playerGestureData);

                if (gesture.playerGestureData.playerGestureInfo.intoPhotoBase64 != null)
                {
                    intoPhoto.texture = gesture.playerGestureData.playerGestureInfo.intoPhotoBase64.Get();
                }
                else
                {
                    intoPhoto.texture = texture;
                }
            });
            //录入信息按钮事件添加
            leaveEntry.OnClick.AddListener(() =>
            {
                PlayerGestureManager.Instance.SetGestureJointData(PlayerGestureInfo.GestureType.Start, gesture.playerGestureData);

                if (gesture.playerGestureData.playerGestureInfo.leavePhotoBase64 != null)
                {
                    leavePhoto.texture = gesture.playerGestureData.playerGestureInfo.leavePhotoBase64.Get();
                }
                else
                {
                    leavePhoto.texture = texture;
                }
            });
            //删除信息按钮事件添加
            remove.OnClick.AddListener(() =>
            {
                transform.localScale = Vector3.zero;
                setGesturePanel.RemoveGesture(gesture);
            });
            //确定信息按钮事件添加
            Ok.OnClick.AddListener(() =>
            {
                transform.localScale = Vector3.zero;
                gesture.playerGestureData.playerGestureInfo.isOnLeftFoot  = leftFoot.isChoice;
                gesture.playerGestureData.playerGestureInfo.isOnRightFoot = rightFoot.isChoice;
                gesture.playerGestureData.playerGestureInfo.isOnLeftHand  = leftHand.isChoice;
                gesture.playerGestureData.playerGestureInfo.isOnRightHand = rightHand.isChoice;

                gesture.playerGestureData.playerGestureInfo.isLeftFootMain  = leftFootToggle.isOn;
                gesture.playerGestureData.playerGestureInfo.isRightFootMain = rightFootToggle.isOn;
                gesture.playerGestureData.playerGestureInfo.isLeftHandMain  = leftHandToggle.isOn;
                gesture.playerGestureData.playerGestureInfo.isRightHandMain = rightHandToggle.isOn;

                gesture.playerGestureData.playerGestureInfo.GestureName       = gestureName.text;
                gesture.playerGestureData.playerGestureInfo.isFindGesture     = toggle.isOn;
                gesture.playerGestureData.playerGestureInfo.gestureActionType = (GestureActionType)(Enum.GetValues(typeof(GestureActionType))).GetValue(dropdown.value);
                if (gesture.playerGestureData.playerGestureInfo.isFindGesture)
                {
                    PlayerGestureManager.Instance.ReturnFindGesture(gesture.playerGestureData);
                }
                try
                {
                    gesture.playerGestureData.playerGestureInfo.timeGesture = float.Parse(gestureTime.text);
                    gesture.playerGestureData.playerGestureInfo.offset      = int.Parse(gestureOffset.text);
                }
                catch (System.Exception e)
                {
                    print(e.Data);
                }
                gesture.gestureButton.Init();
                gesture.Init(gesture.playerGestureData, setGesturePanel);
            });
        }