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

public class LobbyController : MonoBehaviour
{
    void Start()
    {
        InputScreen.swipeInputDelegate += SwipeInputListener;
    }
    void OnDestroy ()
    {
        InputScreen.swipeInputDelegate -= SwipeInputListener;
    }

    public void OnPressStart()
    {
        ChangeScene("Level");
    }

    private void SwipeInputListener(string directionName)
    {
        if (directionName == "Right")
            ChangeScene("Level");
    }

    private void ChangeScene(string sceneName)
    {
        Constants.currentLevel = 1;
        Application.LoadLevel(sceneName);
    }
}
