public void Desactivate() { car.SetActive(true); activated = false; if (current != null) { current.SetActive(false); } current = null; }
// switch the replay camera public void ChangeActiveCamera(IReplayCamera camera) { GameObject.Find("ReplayStockcarCamera").GetComponent <UnityEngine.Camera>().enabled = false; GameObject.Find("ReplayStockcarCamera").GetComponent <AudioListener>().enabled = false; if (current == null) { current = camera; } else if (camera == current) { return; } else { current.SetActive(false); current = camera; } }
public void Abandon() { current.SetActive(false); current = null; }