public void OnInputClicked(InputEventData eventData)
 {
     if (IsEnabled)
     {
         ButtonPressed.RaiseEvent();
     }
 }
 public void OnInputClicked(InputEventData eventData)
 {
     if (isLocalPlayer)
     {
         CmdFire();
     }
 }
        public void OnInputClicked(InputEventData eventData)
        {
            // If we have a text to speech manager on the target object, say something.
            // This voice will appear to emanate from the object.
            if (TextToSpeech != null)
            {
                // Get the name
                var voiceName = Enum.GetName(typeof(TextToSpeechVoice), TextToSpeech.Voice);

                // Create message
                var msg = string.Format("This is the {0} voice. It should sound like it's coming from the object you clicked. Feel free to walk around and listen from different angles.", voiceName);

                // Speak message
                TextToSpeech.SpeakText(msg);
            }
        }
        public void OnInputClicked(InputEventData eventData)
        {
            // On each tap gesture, toggle whether the user is in placing mode.
            placing = !placing;

            // If the user is in placing mode, display the spatial mapping mesh.
            if (placing)
            {
                spatialMappingManager.DrawVisualMeshes = true;

                Debug.Log(gameObject.name + " : Removing existing world anchor if any.");

                anchorManager.RemoveAnchor(gameObject);
            }
            // If the user is not in placing mode, hide the spatial mapping mesh.
            else
            {
                spatialMappingManager.DrawVisualMeshes = false;
                // Add world anchor when object placement is done.
                anchorManager.AttachAnchor(gameObject, SavedAnchorFriendlyName);
            }
        }
 public void OnInputClicked(InputEventData eventData)
 {
     PlaneTargetGroupPicker.Instance.PickNewTarget();
 }
        public void OnInputDown(InputEventData eventData)
        {
            if (isDragging)
            {
                // We're already handling drag input, so we can't start a new drag operation.
                return;
            }

            if (!eventData.InputSource.SupportsInputInfo(eventData.SourceId, SupportedInputInfo.Position))
            {
                // The input source must provide positional data for this script to be usable
                return;
            }

            currentInputSource = eventData.InputSource;
            currentInputSourceId = eventData.SourceId;
            StartDragging();
        }
 public void OnInputUp(InputEventData eventData)
 {
     if (currentInputSource != null &&
         eventData.SourceId == currentInputSourceId)
     {
         StopDragging();
     }
 }
 /// <summary>
 /// Function for consuming the OnInputUp events
 /// </summary>
 /// <param name="eventData"></param>
 public virtual void OnInputUp(InputEventData eventData)
 {
     IsInputSourceDown = false;
 }
 /// <summary>
 /// Function for receiving OnInputDown events from InputManager
 /// </summary>
 /// <param name="eventData"></param>
 public virtual void OnInputDown(InputEventData eventData)
 {
     IsInputSourceDown = true;
 }
 /// <summary>
 /// Function for receiving OnInputClicked events from InputManager
 /// </summary>
 /// <param name="eventData"></param>
 public virtual void OnInputClicked(InputEventData eventData)
 {
     // Open input socket for other cool stuff...
 }
 public void OnInputUp(InputEventData eventData)
 {
     throw new NotImplementedException();
 }
Exemple #12
0
 void IInputHandler.OnInputDown(InputEventData eventData)
 {
     HandleInputAction(eventData);
 }
Exemple #13
0
 void IInputHandler.OnInputUp(InputEventData eventData)
 {
     // Let the input fall to the next interactable object.
 }