private void StartStage() { if (IsRunning) { if (GameManager.GameIsPaused) { GameManager.UnPauseGame(); } // else // return; } // Conectando/reconectando dispositivos "OnTheFly", ou seja, em tempo de execução. Debug.Log("CONECTANDO/RECONECTANDO DISPOSITIVOS..."); serialControllerPitaco.Connect(); serialControllerMano.Connect(); serialControllerCinta.Connect(); serialControllerPitaco.StartSamplingDelayed(); serialControllerMano.StartSamplingDelayed(); serialControllerCinta.StartSamplingDelayed(); IsRunning = true; OnStageStart?.Invoke(); }
public Stage(Platform startPlatform) { GameObject = new GameObject("Stage"); PlatformsFactory = new PlatformsFactory(GameObject.transform); var space = UnityEngine.Random.Range(MINIMUM_SPACE, MAXIMUM_SPACE); CurrentLevel = new Level(startPlatform, PlatformsFactory.CreatePlatform(startPlatform, space)); CurrentLevel.OnLevelEnd += CurrentLevel_OnLevelEnd; CurrentLevel.SpaceBetweenPlatforms = space; OnStageStart?.Invoke(); }
private void StartStage() { if (IsRunning) { if (GameManager.GameIsPaused) { GameManager.UnPauseGame(); } } serialControllerPitaco.StartSamplingDelayed(); serialControllerMano.StartSamplingDelayed(); serialControllerCinta.StartSamplingDelayed(); serialControllerOximetro.StartSamplingDelayed(); IsRunning = true; OnStageStart?.Invoke(); }
public override void InitStart() { onStageStartCallback?.Invoke(); }
public void StartStage(Stage stage) { CurrentStage = stage; OnStageStart?.Invoke(stage); }