Пример #1
0
    // Update is called once per frame
    void Update()
    {
        var colliders = Physics.OverlapSphere(transform.position, radius);

        if (vrHand.ButtonDown)
        {
            foreach (var col in colliders)
            {
                if (col.tag == "Beat")
                {
                    Destroy(col.gameObject);

                    if (OnDestroyBeat != null)
                    {
                        OnDestroyBeat();
                    }

                    vrHand.HapticPulse(2000);
                    vrHand.HapticPulse(2000);
                    vrHand.HapticPulse(2000);
                    vrHand.HapticPulse(2000);
                    vrHand.HapticPulse(2000);
                    vrHand.HapticPulse(2000);
                }
            }
        }
    }