Example #1
0
        private void OnEnable()
        {
            EventHandGrip.AddListener(OnGrip);
            EventHandIdle.AddListener(OnIdle);

            MSwitchManager.AddListener(OnSwitch);
        }
Example #2
0
        /// <summary>
        /// 释放
        /// </summary>
        public void SetGrip()
        {
            if (!isEnable)
            {
                return;
            }

            if (isPressed)
            {
                return;
            }

            isPressed = true;

            HandStatus = MInputHandStatus.Grip;

            EventHandGrip.SendListener(HandIndex);
        }
Example #3
0
 private void OnDisable()
 {
     EventHandGrip.RemoveListener(OnGrip);
     EventHandIdle.RemoveListener(OnIdle);
     MSwitchManager.RemoveListener(OnSwitch);
 }
Example #4
0
 public void Start()
 {
     EventHandGrip.AddListener(OnButtonPress);
     EventHandIdle.AddListener(OnButtonRelease);
     EventHandUIRay.AddListener(OnUIRay);
 }