SebastianLawe

Untitled

Jan 29th, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Diagnostics;
  4.  
  5. public class SplashScreen : MonoBehaviour {
  6.  
  7.     Stopwatch stopwatch;
  8.     public int _delay = 0;
  9.     public int _levelIndex = 1;
  10.     // Use this for initialization
  11.     void Start () {
  12.         stopwatch = Stopwatch.StartNew();
  13.     }
  14.    
  15.     // Update is called once per frame
  16.     void Update () {
  17.         if (stopwatch.ElapsedMilliseconds >= _delay / Time.timeScale) {
  18.             // The level to load
  19.             Application.LoadLevel(_levelIndex);
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment