using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MainMenu : MonoBehaviour
{

    public GameObject MainMenuPanel;
    public GameObject SettingsPanel;
    public float transitionTime;
    public LeanTweenType transitionEffect;

    private Vector2 defaultCenter;

    void Awake(){
        defaultCenter = MainMenuPanel.transform.position;
        SettingsPanel.transform.position = MainMenuPanel.transform.position - new Vector3(3000,0);
        SettingsPanel.SetActive(true);
    }
    public void Leave(){
        Application.Quit();
    }

    void Start(){
        // MessageBox.ShowMessage("Welcome to Infinite Golf 2D.\nThis is a slow paced 2d endless golf game, All the levels are proceduraly generated and you will be rewarded for putting the ball in every and each hole.\n\nGood Luck","Welcome");
    }


    public void SettingsPage(){
        LeanTween.moveX(MainMenuPanel, 3000, transitionTime).setEase(transitionEffect);
        LeanTween.moveX(SettingsPanel, defaultCenter.x, transitionTime).setEase(transitionEffect);
    }

    public void MainPage(){
        LeanTween.moveX(MainMenuPanel, defaultCenter.x, transitionTime).setEase(transitionEffect);
        LeanTween.moveX(SettingsPanel, -3000, transitionTime).setEase(transitionEffect);
    }
}
