﻿
using HutongGames.PlayMaker;

namespace SRDebugger.Playmaker.Actions
{

	[ActionCategory("SRDebugger")]
	[Tooltip("Open the SRDebugger panel with the specified tab.")]
	public class OpenDebugPanel : FsmStateAction
	{

		public DefaultTabs Tab;

		[Tooltip("If true, the entry code will not be required.")]
		[RequiredField]
		public FsmBool BypassEntryCode;
		
		public override void OnEnter()
		{
			SRDebug.Instance.ShowDebugPanel(Tab, !BypassEntryCode.Value);
			Finish();
		}

	}

}