Beispiel #1
0
    void Start()
    {
        //if (isServer)
        fadeAnimator.SetTrigger("FadeIn");

        controladorConexoes = ControladorConexoes.Pegar();
        controladorConexoes.networkManagerHUD.showGUI = false;

        int voltasSelecionadas = controladorConexoes.voltasSelecionadas;

        if (voltasSelecionadas > 0 && voltasSelecionadas != voltasTotal)
        {
            voltasTotal = voltasSelecionadas;
        }

        vencedorAnimator = vencedorImage.GetComponent <Animator>();
        AlterarExibicaoVencedor(false);

        PegarPremioImageJogadores();
        AtualizarVoltasTotalTextJogadores();
    }
Beispiel #2
0
    void Start()
    {
        controladorJogo     = ControladorJogo.Pegar();
        controladorConexoes = ControladorConexoes.Pegar();

        if (isServer)
        {
            idJogador = isLocalPlayer ? 1 : 2;
        }
        else
        {
            idJogador = isLocalPlayer ? 2 : 1;
        }

        PegarElementosCanvas();

        if (!isLocalPlayer)
        {
            return;
        }

        controladorNeuroSky = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        controladorNeuroSky.UpdatePoorSignalEvent += OnUpdateSinal;
        controladorNeuroSky.UpdateAttentionEvent  += OnUpdateConcentracao;

        if (controladorConexoes.arduino != null)
        {
            arduino = controladorConexoes.arduino;
            StartCoroutine
            (
                LerArduino((string s) => CmdContabilizarVolta(s))
                // LerArduino((string s) => Debug.Log(s))
            );
        }

        StartCoroutine(GravarArduino());
    }