using System;
using UnityEngine;

public class VREventTrigger : MonoBehaviour
{
	public void Awake()
	{
		this.m_collider = base.GetComponent<Collider>();
	}

	protected virtual void Start()
	{
	}

	public virtual float GetTimeOutTime()
	{
		if (this.m_bTimeOutDefault)
		{
			return VREventTrigger.m_fTimeOutDefault;
		}
		return this.m_fTimeOut;
	}

	public void SetEnableEvent(bool f_bEnable)
	{
		this.m_bEnable = f_bEnable;
	}

	public bool IsEnableEvent()
	{
		return this.m_bEnable;
	}

	public void SetEnableCollider(bool f_bEnable)
	{
		this.m_collider.enabled = f_bEnable;
	}

	public bool IsEnableCollider()
	{
		return this.m_collider.enabled;
	}

	public string GetEventName()
	{
		return this.m_strEventName;
	}

	public virtual void StartScript()
	{
		if (this.m_bEnable)
		{
			bool flag = false;
			if (!string.IsNullOrEmpty(this.m_strScriptFileName))
			{
				Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
				GameMain.Instance.ScriptMgr.LoadAdvScenarioScript(((!(maid == null)) ? ScriptManager.ReplacePersonal(maid, this.m_strScriptFileName) : this.m_strScriptFileName) + ".ks", string.Empty);
				flag = true;
			}
			if (!string.IsNullOrEmpty(this.m_strScriptLabel))
			{
				GameMain.Instance.ScriptMgr.adv_kag.JumpLabel(this.m_strScriptLabel);
				flag = true;
			}
			if (flag)
			{
				GameMain.Instance.ScriptMgr.adv_kag.Exec();
			}
		}
	}

	public virtual void OnEvnetCountDownEnter(GameObject f_goSrc)
	{
	}

	public virtual void OnEventCountDownExit(GameObject f_goSrc)
	{
	}

	public static float m_fTimeOutDefault = 3f;

	public bool m_bTimeOutDefault;

	public float m_fTimeOut = 3f;

	public string m_strEventName;

	public string m_strScriptFileName;

	public string m_strScriptLabel;

	public bool m_bEnable = true;

	private Collider m_collider;
}
