using System;
using Cute;

public class WatcherDisconnectChecker : NetworkBattleIntervalCheckerBase
{
	private const float DISP_DISCONNECT_INTERVAL = 30f;

	public bool isDisp;

	public event Action OnDisp;

	public event Action OnErase;

	public void EraseDisp()
	{
		if (isDisp)
		{
			this.OnErase.Call();
			isDisp = false;
		}
	}

	protected override void IntervalCheck()
	{
		base.IntervalCheck();
		if ((float)NetworkUtility.GetTimeSpanSecond(base.startTick) >= 30f)
		{
			this.OnDisp.Call();
			isDisp = true;
			StopChecker();
		}
	}

	public override void FinishChecker()
	{
		base.FinishChecker();
		EraseDisp();
	}
}
