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

public class ExitController : GridObject {

	public enum exitDirection
    {
        UP,
        DOWN
    }

    public exitDirection m_direction = exitDirection.DOWN;

    public override void Push(GridObject source)
    {
        if (source.m_type == objectType.PLAYER)
        {
            switch (m_direction)
            {
                case exitDirection.UP:
                    PlayerController.Instance.m_playerAction = playerAction.DO_NOTHING;
                    GameManager.Instance.ChangeLevel(true);
                    break;
                case exitDirection.DOWN:
                    PlayerController.Instance.m_playerAction = playerAction.DO_NOTHING;
                    GameManager.Instance.ChangeLevel(false);
                    break;
            }
        }
    }
}
