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

public class Initial_UI : MonoBehaviour
{
    public Button salt;
    public Button scheol;
    public Image mask;
    // Use this for initialization
    void Start()
    {
        salt.onClick.AddListener(delegate { SceneManager.LoadSceneAsync("OriginSalt"); 
			StartCoroutine(ShowMask()); 
		});
        scheol.onClick.AddListener(delegate { SceneManager.LoadSceneAsync("OriginScheol"); 
			StartCoroutine(ShowMask());
		});
        
    }
    IEnumerator ShowMask()
    {
        while (true)
        {
            Color cm = mask.color;
            cm.a += 16 * Time.deltaTime;
            mask.color = cm;
            yield return null;
        }
    }
}
