Beispiel #1
0
 protected override void InputSystemUpdateLeftHandler(WandLeft group)
 {
     base.InputSystemUpdateLeftHandler(group);
     if (leftController.GetTouch(touchPad))
     {
         var moveEvent = new RigMoveEvent();
         moveEvent.movement = leftController.GetAxis(touchPad) * Time.deltaTime;
         Publish(moveEvent);
     }
     if (leftController.GetPressDown(menuButton))
     {
         Publish(new MenuEvent());
     }
     if (!leftController.GetPress(triggerButton) && grabbedGameObject != null)
     {
         grabbedGameObject.transform.SetParent(null);
     }
 }
 protected virtual void InputSystemUpdateLeftHandler(WandLeft group)
 {
 }
 protected virtual void InputSystemOnTriggerExitHandler(uFrame.ECS.UnityUtilities.OnTriggerExitDispatcher data, Grabable collider, WandLeft source)
 {
 }
Beispiel #4
0
 protected override void InputSystemOnTriggerExitHandler(OnTriggerExitDispatcher data, Grabable collider, WandLeft source)
 {
     base.InputSystemOnTriggerExitHandler(data, collider, source);
     Debug.Log("Exit");
     if (grabbedGameObject != null)
     {
         if (grabbedGameObject.transform.parent != source.gameObject.transform)
         {
             grabbedGameObject.GetComponent <MeshRenderer>().material.color = Color.green;
             grabbedGameObject = null;
         }
     }
 }
Beispiel #5
0
 protected override void InputSystemOnTriggerStayHandler(OnTriggerStayDispatcher data, Grabable collider, WandLeft source)
 {
     base.InputSystemOnTriggerStayHandler(data, collider, source);
     if (grabbedGameObject == null)
     {
         grabbedGameObject = collider.gameObject;
         grabbedGameObject.GetComponent <MeshRenderer>().material.color = Color.red;
     }
     if (leftController.GetPress(triggerButton) && grabbedGameObject.transform.parent != source.gameObject.transform)
     {
         grabbedGameObject.transform.SetParent(source.transform, true);
     }
 }
Beispiel #6
0
 protected override void InputSystemOnTriggerEnterHandler(OnTriggerEnterDispatcher data, Grabable collider, WandLeft source)
 {
     base.InputSystemOnTriggerEnterHandler(data, collider, source);
     Debug.Log("Enter");
     Debug.Log(collider + "" + source);
 }
 public virtual void SetLeft(WandLeft value)
 {
     SetProperty(ref _Left, value, ref _LeftEvent, _LeftObservable);
 }