Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System.Diagnostics;
- public class SplashScreen : MonoBehaviour {
- Stopwatch stopwatch;
- public int _delay = 0;
- public int _levelIndex = 1;
- // Use this for initialization
- void Start () {
- stopwatch = Stopwatch.StartNew();
- }
- // Update is called once per frame
- void Update () {
- if (stopwatch.ElapsedMilliseconds >= _delay / Time.timeScale) {
- // The level to load
- Application.LoadLevel(_levelIndex);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment