Advertisement
Guest User

Level delay

a guest
Nov 30th, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class LevelLoad : MonoBehaviour {
  5.  
  6.     // Use this for initialization
  7.     void Start () {
  8.    
  9.     }
  10.    
  11.     // Update is called once per frame
  12.     void Update () {
  13.    
  14.     }
  15.  
  16.     void OnCollisionEnter(Collision other)
  17.     {
  18.         if (other.gameObject.tag == "GrabObject")
  19.         {
  20.             Invoke(LoadLevel, 5);
  21.         }
  22.     }
  23.  
  24.     public void LoadLevel()
  25.     {
  26.         Application.LoadLevel("DroneGame_3");
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement