using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class StarMapUI : BaseUI
{
	static StarMapUI instance = null;

	[SerializeField]
	Button hyperJumpButton = null;

	void Start ()
	{
		instance = this;
		ShowHyperJumpButton (false);
	}

	public static void ShowHyperJumpButton(bool showHyperJympButton = true)
	{
		if (instance != null && instance.hyperJumpButton != null)
		{
			instance.hyperJumpButton.interactable = showHyperJympButton;
		}
	}
	
	public void ShowStarSystem()
	{
		CameraController.SetNeedDistance (2f);
		BaseUI.AsyncShowWithLoaderUI<StarSystemUI, LoaderUI> (0, () => {
			Game.SetGameState (1);
		});
	}

	public void StartHyperJump()
	{
		StarMapState.instance.MakeHyperJump ();
	}
}
