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();
        }
Esempio n. 2
0
    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();
    }
Esempio n. 3
0
        private void StartStage()
        {
            if (IsRunning)
            {
                if (GameManager.GameIsPaused)
                {
                    GameManager.UnPauseGame();
                }
            }


            serialControllerPitaco.StartSamplingDelayed();
            serialControllerMano.StartSamplingDelayed();
            serialControllerCinta.StartSamplingDelayed();
            serialControllerOximetro.StartSamplingDelayed();

            IsRunning = true;
            OnStageStart?.Invoke();
        }
Esempio n. 4
0
 public override void InitStart()
 {
     onStageStartCallback?.Invoke();
 }
Esempio n. 5
0
 public void StartStage(Stage stage)
 {
     CurrentStage = stage;
     OnStageStart?.Invoke(stage);
 }