So I am making this fps, which obviously has the mouse look feature. But I am a beginner in Unity, and I do not know how to script this particular scheme.
I have my game load the GameOver scene when the player dies. I do that by making a gamecontroller, an when the player dies, the player sends out a message to the gamecontroller, and when that happens, the gamecontroller loads the GameOver scene. When the GameoVer scene loads, a BGM plays. After the BGM stops playing, or the player clicks his/her mouse or any key, loads the main menu. The problem is, when the game loads the GameOver scene, the mouse still does not display.
I want an extension to the gamocontroller script, which now only has the ability to load the Gameover level. The script I have now is displayed below. (The gameover scene is loaded in the function FPSmort(); section.
private var objectives : int;
function OnEnableObjective() {
objectives++;
}
function OnDisableObjective() {
objectives--;
if (objectives == 0)
SendMessage("OnObjectives");
}
function OnObjectives() {
Application.LoadLevel("LPF");
}
function FPSmort()
{
Application.LoadLevel("GameOver");
}