using System;
using UnityEngine;

public class OvrControllerHit : MonoBehaviour
{
	private void Start()
	{
		byte[] array = new byte[32];
		for (int i = 0; i < array.Length; i++)
		{
			array[i] = 128;
		}
		NDebug.Assert(OVRPlugin.version >= new Version(1, 6, 0), "Unity内臓のOVRPlugin.dllが古いです。");
		this.m_HapticsClip = new OVRHapticsClip(array, array.Length);
	}

	private void OnCollisionEnter(Collision collision)
	{
		this.CoVive();
	}

	private void CoVive()
	{
		if (this.m_bHandL)
		{
			OVRHaptics.LeftChannel.Mix(this.m_HapticsClip);
		}
		else
		{
			OVRHaptics.RightChannel.Mix(this.m_HapticsClip);
		}
	}

	public ushort m_uViveForce = 1000;

	public float m_fViveTimeMS = 0.1f;

	public bool m_bHandL = true;

	private OVRHapticsClip m_HapticsClip;
}
