using FalcoEngine;
using System;
using System.Collections;
using System.Collections.Generic;

public class completed_s : MonoBehaviour
{
	public Texture image;
	private float scale=0;
	private float x;
	private float y=-2000;
	private float width;
	private float height;
	private int rel;
	public Prefab sound_win;
	
	void Start()
	{
		//Destroy(GameObject.Find("mus"));
		//sound_win.Instantiate(transform.position,Quaternion.Euler(0,0,0));
	}
	
	void FixedUpdate()
	{
		y=Mathf.Lerp(y,0,0.02f);
		
		rel++;
		
		if(rel==400)
		{
			if(FalcoEngine.SceneManager.loadedScene=="game.scene")
			{
				FalcoEngine.SceneManager.LoadScene("game2.scene");
			}

			if(FalcoEngine.SceneManager.loadedScene=="game2.scene")
			{
				FalcoEngine.SceneManager.LoadScene("game3.scene");
			}

			if(FalcoEngine.SceneManager.loadedScene=="game3.scene")
			{
				FalcoEngine.SceneManager.LoadScene("game4.scene");
			}

			if(FalcoEngine.SceneManager.loadedScene=="game4.scene")
			{
				FalcoEngine.SceneManager.LoadScene("finish.scene");
			}
		}
	}
	
	void OnGUI()
	{
		GUI.Image(image,new Rect(0,y,Screen.width,Screen.height));
	}
}
