23 lines
462 B
C#
23 lines
462 B
C#
|
using UnityEngine;
|
||
|
using UnityEngine.SceneManagement;
|
||
|
using System.Collections;
|
||
|
|
||
|
public class SceneTransition : MonoBehaviour
|
||
|
{
|
||
|
public void StartAnimation()
|
||
|
{
|
||
|
Animator ani = GetComponent<Animator>();
|
||
|
|
||
|
ani.SetTrigger("start");
|
||
|
|
||
|
StartCoroutine(ChangeSceneAfterAnimation());
|
||
|
}
|
||
|
|
||
|
IEnumerator ChangeSceneAfterAnimation()
|
||
|
{
|
||
|
yield return new WaitForSeconds(1.5f);
|
||
|
|
||
|
SceneManager.LoadScene("GameScene");
|
||
|
}
|
||
|
}
|