private void PauseRunningSimulation(PauseSimulation m) { Context.GetLogger().Info($"Pause Simulation {m.ProjectId}"); _currentSimulation.Actor.Tell(m); Sender.Tell(new SimulationPaused() { ProjectId = m.ProjectId }); Become(Paused); }
private bool scriptsEnabled = true; //used in the update function to minimize the times it calls the pause function. void Start() { /* "Gameobject.Find" is used cause there are many turbines gameobjects in the scene and their properties musr be inserted through script. * We use FindWithTag to improve perfomance by minimizing the searching operations. */ turbineDmg = gameObject.GetComponent <TurbineDamage>(); inputManager = gameObject.GetComponent <TurbineInputManager>(); turbineAnim = gameObject.GetComponentInChildren <TurbineAnimCtrl>(); turbineSpawner = GameObject.FindGameObjectWithTag("Spawner").GetComponent <TurbineSpawnManager>(); simulator = GameObject.FindGameObjectWithTag("Simulator").GetComponent <Simulation>(); gameManager = GameObject.FindGameObjectWithTag("Simulator").GetComponent <PauseSimulation>(); damager = GameObject.FindGameObjectWithTag("Damager").GetComponent <Damager>(); repair = gameObject.GetComponent <TurbineRepair>(); }