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

public class Interactable : MonoBehaviour
{
    public int option;
    public void Interact()
    {
        var type = typeof(Interactable);
        var e = type.GetMethod("M"+option.ToString());
        if(e == null)
        {
            return;
        }
        e.Invoke(this, null);
    }
    public void M0()
    {
        SceneManager.LoadScene(2);
    }
    public void M1()
    {
        gbs.Shop.SetActive(true);
    }
}
public static class gbs
{
    public static GameObject Shop;
    public static void Start()
    {
        Shop = GameObject.Find("Shop");
        Shop.SetActive(false);
    }
}
