protected virtual void InputSystemOnTriggerExitHandler(uFrame.ECS.UnityUtilities.OnTriggerExitDispatcher data, Grabable collider, WandLeft source)
 {
 }
Beispiel #2
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 #3
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 #4
0
 protected override void InputSystemOnTriggerEnterHandler(OnTriggerEnterDispatcher data, Grabable collider, WandLeft source)
 {
     base.InputSystemOnTriggerEnterHandler(data, collider, source);
     Debug.Log("Enter");
     Debug.Log(collider + "" + source);
 }