using UnityEngine;
using System.Collections;

public class Escada : MonoBehaviour {
	public int personagens;

	void OnCollisionEnter(Collision c) {
		if (c.gameObject.tag == "jogador") {
			personagens++;
			if(personagens == 3) Application.LoadLevel(4);
		}
	}

	void OnCollisionExit(Collision c) {
		if (c.gameObject.tag == "jogador") {
			personagens--;
		}
	}

}
