Exemplo n.º 1
0
 private void Update()
 {
     if (m_canSpawn)
     {
         m_inputHand.GetComponentInParent <MTK_InputManager>().Haptic(Time.deltaTime);
     }
 }
Exemplo n.º 2
0
    private void Update()
    {
        if (m_placingEnabled)
        {
            for (int i = 0; i < m_handsInTrigger.Count; ++i)
            {
                MTK_InteractHand hand = m_handsInTrigger[i].First;
                Hologram         holo = m_handsInTrigger[i].Second;

                if (hand.m_grabbed != null)
                {
                    if (hand.m_grabbed != m_dropzone.catchedObject)
                    {
                        if (!holo)
                        {
                            holo = CreateHologram(hand.m_grabbed.gameObject);
                            m_handsInTrigger[i].Second = holo;
                        }
                        holo.gameObject.SetActive(true);
                        DrawHologram(holo, hand.m_grabbed.transform);
                    }
                }
                else
                {
                    if (holo)
                    {
                        if (holo.isActiveAndEnabled)
                        {
                            AnchorHologram(holo);
                        }

                        hand.GetComponentInParent <MTK_InputManager>().Haptic(1);
                        AkSoundEngine.PostEvent("Play_Pose", gameObject);

                        m_handsInTrigger[i].Second = null;
                        Destroy(holo.gameObject);
                    }
                }
            }
        }
    }