using System;
using UnityEngine;

public class StaffRollMgr : BaseCreatePanel
{
	public BasePanelMgr.FadeState CurrentFadeState
	{
		get
		{
			return this.currentFadeState;
		}
	}

	public override void Init()
	{
		this.m_goPanel = base.GetPanel("StaffRollPanel");
		this.staffrollScroll.gameObject.SetActive(true);
		this.currentViewerType = StaffRollMgr.ViewerType.StaffRoll;
		this.m_api = new StaffRollAPI();
		base.SetDurationToFadeIn(2f);
		base.SetDurationToFadeOut(2f);
	}

	public void OpenStaffRollPanel()
	{
		this.m_api.SceneStart(this, new StaffRollAPI.dgOnSceneStartCallBack(this.OpenStaffRollCallBack));
	}

	private void OpenStaffRollCallBack()
	{
		base.BaseOpenPanel();
	}

	protected override void OpenPanel()
	{
		StaffRollMgr.ViewerType viewerType = this.currentViewerType;
		if (viewerType != StaffRollMgr.ViewerType.StaffRoll)
		{
			if (viewerType != StaffRollMgr.ViewerType.Logo)
			{
			}
		}
	}

	public void Finish()
	{
		this.m_api.EndNextScene(new StaffRollAPI.dgOnSceneFinalCallBack(this.sceneMgr.CloseScene));
	}

	public void CloseViewerAndPanel()
	{
		base.BaseClosePanel();
	}

	protected override void AfterClose()
	{
	}

	protected override void SetFadeTargetPanel()
	{
		this.fadeTargetPanel = this.m_goPanel;
	}

	private void Update()
	{
		if (this.staffrollScroll.Finish || Input.GetKeyUp(KeyCode.Return))
		{
			this.Finish();
		}
	}

	[SerializeField]
	private StaffRollScroll staffrollScroll;

	private StaffRollAPI m_api;

	private StaffRollMgr.ViewerType currentViewerType;

	private const int LeftClick = 0;

	private enum ViewerType
	{
		None,
		StaffRoll,
		Logo
	}
}
