public void OnInputClicked(InputClickedEventData eventData) { Debug.LogFormat("OnInputClicked\r\nSource: {0} SourceId: {1} InteractionPressKind: {2} TapCount: {3}", eventData.InputSource, eventData.SourceId, eventData.PressType, eventData.TapCount); eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. CLicked.SetActive(false); //ToOpen.SetActive (true); }
public void OnInputClicked(InputClickedEventData eventData) { if (!EnableActivation) { return; } Selected = !Selected; if (Activated != null) { Activated(this); } if (sceneToLoad == "Tutorial") { SceneMenu.SetActive(false); SceneTutorial.SetActive(true); } if (sceneToLoad == "Game") { SceneMenu.SetActive(false); SpaceBackground.SetActive(false); SceneGame.SetActive(true); } eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. }
public void OnInputClicked(InputClickedEventData eventData) { Debug.Log("InputClicked"); selected = !selected; eventData.Use(); }
public void OnInputClicked(InputClickedEventData eventData) { //隐藏路线 ChessManager.GetInstant().HidenRoad(); ChessManager.GetInstant().ReleaseQizi(); eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. }
/// <summary> /// Called when a click event is detected /// </summary> /// <param name="eventData">Information about the click.</param> public void OnInputClicked(InputClickedEventData eventData) { if (networkDiscovery.running) { // Only let HoloLens host // We are also allowing the editor to host for testing purposes, but shared anchors // will currently not work in this mode. if ( #if UNITY_WSA && UNITY_2017_2_OR_NEWER !UnityEngine.XR.WSA.HolographicSettings.IsDisplayOpaque || #endif Application.isEditor) { if (Application.isEditor) { Debug.Log("Unity editor can host, but World Anchors will not be shared"); } networkDiscovery.StartHosting("DefaultName"); eventData.Use(); } // enable menu MyUIManager.Instance.EnableMainMenu(true); } }
public virtual void OnInputClicked(InputClickedEventData eventData) { // On each tap gesture, toggle whether the user is in placing mode. IsBeingPlaced = !IsBeingPlaced; HandlePlacement(); eventData.Use(); }
public void OnInputClicked(InputClickedEventData eventData) { //GameObject.Find("nutrition_facts").GetComponent<SpriteRenderer>().color = Color.white; tomato.transform.localScale += 0.5f * tomato.transform.localScale; eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. }
public void OnInputClicked(InputClickedEventData eventData) { GameObject currentObject = eventData.selectedObject; if (currentObject.name == "9v") { AnimationObject.SetActive(false); previousTutorial.GetComponent <Animator>().enabled = false; previousTutorial.GetComponent <AudioSource>().enabled = false; eventData.Use(); audioSource = GetComponent <AudioSource>(); audioSource.clip = positiveWire; audioSource.Play(); changeText.text = "Connect the wires to the holes again."; NineVolt.SetActive(true); OnePointFiveVolt.SetActive(false); LEDOn.SetActive(false); LEDOff.SetActive(true); oldNegative.SetActive(false); oldPositive.SetActive(false); nextTutorial.GetComponent <SecondPowerWireTutorial>().enabled = true; previousTutorial.GetComponent <PowerWireTutorial>().enabled = false; TaskCompleted = true; this.enabled = false; TutorialManager.Instance.CompletedTutorial(); } }
public void OnInputClicked(InputClickedEventData eventData) { if (isOpaque == false && MyUIManager.Instance.CurrentModelEditMode == MyUIManager.ModelEditType.Move) { Moving = !Moving; if (Moving) { inputManager.AddGlobalListener(gameObject); if (SpatialMappingManager.Instance != null) { SpatialMappingManager.Instance.DrawVisualMeshes = true; } } else { inputManager.RemoveGlobalListener(gameObject); if (SpatialMappingManager.Instance != null) { SpatialMappingManager.Instance.DrawVisualMeshes = false; } UpdateTransformNetwork(); } eventData.Use(); } }
/// <summary> /// On Airtab start or stop placing. /// </summary> public void OnInputClicked(InputClickedEventData eventData) { if (!eventData.used) { if (!IsPlacing && isPlacementButtonFocused) { eventData.Use(); OnPlacementStart(); } else if (IsPlacing) { eventData.Use(); OnPlacementStop(); } } }
public void OnInputClicked(InputClickedEventData eventData) { GameObject currentObject = eventData.selectedObject; //if (TutorialManager.FindCurrentTutorial() == 3) if (currentObject.name == "resistor1") { previousTutorial.GetComponent <AudioSource>().enabled = false; audioSource = GetComponent <AudioSource>(); audioSource.clip = resistorPlace; audioSource.Play(); changeText.text = "Select the holes to place the resistor."; new WaitForSeconds(audioSource.clip.length); eventData.Use(); nextTutorial.GetComponent <ResistPlace>().enabled = true; previousTutorial.GetComponent <LEDPlace>().enabled = false; TaskCompleted = true; this.enabled = false; TutorialManager.Instance.CompletedTutorial(); } }
public void OnInputClicked(InputClickedEventData eventData) { eventData.Use(); // イベントが使われたことを記録して、他の処理に受け取られるのを防ぐ if (shouldExistPrefab) { var prefabs = GameObject.FindGameObjectsWithTag(PrefabTag); foreach (var prefab in prefabs) { var syncModelAccessor = prefab.GetComponent <DefaultSyncModelAccessor>(); if (syncModelAccessor != null) { var syncSpawnObject = (SyncSpawnedObject)syncModelAccessor.SyncModel; // 磁石のOnDestroyを走らせる UnityEngine.Object.DestroyImmediate(prefab); this.spawnManager.Delete(syncSpawnObject); } } shouldExistPrefab = false; } else { Vector3 position = new Vector3(0, 0, 0f); Quaternion rotation = Quaternion.identity; var spawnedObject = new SyncSpawnedGlobalParams(); // 注意 this.spawnManager.Spawn( spawnedObject, position, rotation, spawnParentTransform.gameObject, PrefabTag, false); shouldExistPrefab = true; } }
public void OnInputClicked(InputClickedEventData eventData) { // Increase the scale of the object just as a response. gameObject.transform.localScale += 0.05f * gameObject.transform.localScale; eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. }
public void OnInputClicked(InputClickedEventData eventData) { if (!EnableActivation) { return; } Selected = !Selected; if (Selected) { CustomNetworkManager.singleton.StartClient(); buttonText.text = "Disconnect from server"; } else { CustomNetworkManager.singleton.StopClient(); buttonText.text = "Connect to Server"; } if (Activated != null) { Activated(this); } eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. }
public void OnInputClicked(InputClickedEventData eventData) { // Increase the scale of the object just as a response. atomModel.SetActive(true); eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. }
public void OnInputClicked(InputClickedEventData eventData) { if (eventData.used) { return; } eventData.Use(); // This debug statement helps to identify the scale in Unity of the augmented // columns and panels which we will need to accurate place the augmentations. // Debug.Log("Panel Object lossyScale: x: " + transform.lossyScale.x // + " y: " + transform.lossyScale.y // + " z: " + transform.lossyScale.z); // CustomAudioManager.Instance.PlayInputClicked(); WorldAnchorManager anchorManager = WorldAnchorManager.Instance; if (anchorManager == null) { Debug.Log("Anchor manager not found, please attach it to scene!"); return; } GameObject anchoredClone = null; anchoredClone = GameObject.Instantiate(PrefabsManager.Instance.fixedPanel , gameObject.transform.position , gameObject.transform.rotation); anchoredClone.transform.localScale = gameObject.transform.lossyScale; anchorManager.AttachAnchor(anchoredClone, gameObject.transform.parent.name); anchoredClone.GetComponent <FixedPanel>().RegisterImageTarget(gameObject.transform.parent.gameObject); }
public void OnInputClicked(InputClickedEventData eventData) { if (isOpaque == false) { Moving = !Moving; if (Moving) { inputManager.AddGlobalListener(gameObject); if (SpatialMappingManager.Instance != null) { SpatialMappingManager.Instance.DrawVisualMeshes = true; } } else { inputManager.RemoveGlobalListener(gameObject); if (SpatialMappingManager.Instance != null) { SpatialMappingManager.Instance.DrawVisualMeshes = false; } // Depending on if you are host or client, either setting the SyncVar (host) // or calling the Cmd (client) will update the other users in the session. // So we have to do both. localPosition = transform.localPosition; localRotation = transform.localRotation; if (PlayerController.Instance != null) { PlayerController.Instance.SendSharedTransform(gameObject, localPosition, localRotation); } } eventData.Use(); } }
public void OnInputClicked(InputClickedEventData eventData) { if (eventData.used) { return; } eventData.Use(); // Disables (and later re-enable) button in order to prevent simultaneous requests. gameObject.GetComponent <CompoundButton>().MainCollider.enabled = false; switch (TargetsManager.Instance.calibrationMode) { case TargetsManager.CalibrationMode.COLUMN: TargetsManager.Instance.RegisterColumnImageTargets( AnchorsManager.Instance .LoadAllColumnAnchorsFromStore(PrefabsManager.Instance.fixedColumn) ); break; case TargetsManager.CalibrationMode.PANEL: TargetsManager.Instance.RegisterPanelImageTargets( AnchorsManager.Instance .LoadAllPanelAnchorsFromStore(PrefabsManager.Instance.fixedPanel) ); break; } gameObject.GetComponent <CompoundButton>().MainCollider.enabled = true; }
/// <summary> /// When the button is clicked try to join the selected session /// </summary> /// <param name="eventData"></param> public void OnInputClicked(InputClickedEventData eventData) { ScrollingSessionListUIController.Instance.JoinSelectedSession(); eventData.Use(); // enable menu MyUIManager.Instance.EnableMainMenu(true); }
public void OnInputClicked(InputClickedEventData eventData) { if (HolographicSettings.IsDisplayOpaque) { StartFlying(); } eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. }
public void OnInputClicked(InputClickedEventData eventData) { if (!eventData.used && isFocused && !placable.IsPlacing) { eventData.Use(); modelLoader.Get3DModel(); } }
public void OnInputClicked(InputClickedEventData eventData) { eventData.Use(); onClickEvent.Invoke(); return; }
private void OnClicked(InputClickedEventData eventData) { animator.SetTrigger(animatorNextTrigger); eventData.Use(); Logger.Info("new animation"); Debug.Log("Hello Animation"); }
// Update is called once per frame public void OnInputClicked(InputClickedEventData eventData) { GetComponent <AudioSource>().Play(); string c = "champi"; PlayerPrefs.SetInt(c, 1); gameObject.SetActive(false); eventData.Use(); }
public void OnInputClicked(InputClickedEventData eventData) { if (HolographicSettings.IsDisplayOpaque) { MyRobotMgr.instance.dialogMgr.activo = true; MyRobotMgr.instance.dialogMgr.DictationProcess("Hola machote"); } eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. }
public void OnInputClicked(InputClickedEventData eventData) { if (OnInputClickedEvent != null) { OnInputClickedEvent.Invoke(eventData); } eventData.Use(); }
public void OnInputClicked(InputClickedEventData eventData) { //SelectedObject = eventData.selectedObject.transform.parent.gameObject; SelectedObject = eventData.selectedObject.gameObject; Debug.Log(SelectedObject); AddToComparison(); eventData.Use(); }
public void OnInputClicked(InputClickedEventData eventData) { if (m_Animator != null) { bool _state = m_Animator.GetBool("character_nearby"); m_Animator.SetBool("character_nearby", !_state); } eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. }
public void OnInputClicked(InputClickedEventData eventData) { if (eventData.used) { return; } eventData.Use(); StartCoroutine(Wallet.Instance.MinimiseWallet()); }
public void OnInputClicked(InputClickedEventData eventData) { if (eventData.used) { return; } eventData.Use(); StartCoroutine(LoadCalibrationSceneAsync()); }