Beispiel #1
0
    IEnumerator StartPoll()
    {
        SideMenu         sideMenu      = SideMenu.Instance;
        LargeCubeCluster cubeCluster   = LargeCubeCluster.Instance;
        float            pollCountdown = StartupSettings.Instance.PollPrepareCountdown;

        float timer = pollCountdown;

        //Hide "Join Conversation text"...
        sideMenu.ShowJoinConversation(false);
        sideMenu.ShowTakePoll(false);
        CubeCluster.HidePlayerCubes = true;

        Player.ShowHashtag       = false;
        Player.ShowMoveIcon      = false;
        Player.ShowColor         = true;
        Player.ShowInactiveColor = false;

        //Explode cube...
        yield return(new WaitForSeconds(m_exploadWaitTime));

        Player.ShowTakePollText = true;
        cubeCluster.Explode();

        //Show "Let's Get Started" text...
        sideMenu.ShowGetStarted(true);

        //Show countdown cube...
        yield return(new WaitForSeconds(m_exploadRunTime));

        sideMenu.ShowCameraView(false); //Fading out cube cluster

        yield return(new WaitForSeconds(m_pollWaitTime));

        cubeCluster.DestroyCluster();
        cubeCluster.CreateCluster();

        Player.CountdownValue     = (int)pollCountdown;
        Player.ShowCountdownValue = true;
        StartCoroutine(Player.RunCountdown(null));

        yield return(new WaitForSeconds(pollCountdown + 1f));

        PollManager.Instance.StartNextPoll();
    }