I am trying to make a cutscene in which the player passes a certain point, and then it disables the main camera and player controller, then activates the cutscene camera and plays an animation. I want it to finsh the animation, and then re-activate the main camera and player controller.
public GameObject cam1 = null;
public GameObject cam2 = null;
public GameObject Player = null;
public GameObject Ammo = null;
public GameObject Cube = null;
void Start ()
{
}
void Update ()
{
}
void OnTriggerEnter(Collider bro)
{
if(bro.tag == "Player")
{
bro.GetComponent<Player>().checkPos = transform.position;
cam1.SetActive(false);
cam2.SetActive(true);
Ammo.SetActive(false);
Cube.SetActive(false);
Player.GetComponent<PlayerController>().enabled = false;
System.Threading.Thread.Sleep(5000);
cam1.SetActive(true);
cam2.SetActive (false);
Ammo.SetActive(true);
Cube.SetActive(true);
Player.GetComponent<PlayerController>().enabled = true;
}
}
}