Hey all. I'm getting a parsing error line 26. How can I fix this?
using UnityEngine;
using System.Collections;
public class Thing : MonoBehaviour {
public GameObject [] doors;
private GameObject killDoor;
// Call this when init a level.
void RollKillDoor()
{
killDoor = doors [ Random.Range ( 0, killdoor.Length ) ];
}
// When player choose the door, pass the parameter here.
void OpenDoor ( GameObject choosenDoor )
{
if ( choosenDoor == killDoor )
{
print ( "Game over" );
Application.LoadLevel (1);
}
else
{
print ( "Success!" );
}
}
↧