public void StartSimulation() { history = SpeciesManager.Instance.GetComponent <SpeciesMotor>(); Transform canvas = GameObject.Find("Canvas").transform; timeUI = canvas.GetChild(2).GetComponent <TimeUI>(); timeUI.SetupSimulation(); cameraMovementUI = canvas.GetChild(3).GetComponent <CameraMovementUI>(); zoomMovementUI = canvas.GetChild(3).GetComponent <ZoomMovementUI>(); cameraTransform = Camera.main.transform; cameraTransform.localPosition = new Vector3(0, SimulationScript.Instance.earthSize / 1.5f, 0); RefreshSlider(); timeUI.Pause(); }
void ManageTime() { if (Input.GetKeyDown(KeyCode.Comma)) { timeUI.DecreaceTimeStep(); } if (Input.GetKeyDown(KeyCode.Period)) { timeUI.IncreaceTimeStep(); } if (Input.GetKeyDown(KeyCode.Slash)) { timeUI.Pause(); } }