Skip to content
Permalink
0aa4d3e02a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
17 lines (15 sloc) 379 Bytes
using UnityEngine;
using System.Collections;
public class NextLevel : MonoBehaviour {
public GameObject player;
public int checker = 0;
void OnCollisionEnter2D(Collision2D col)
{
if (col.gameObject.tag == "Player")
{
checker = checker + 1;
Debug.Log("HitExit");
Application.LoadLevel(1);
}
}
}