Exemplo n.º 1
0
    private void Awake()
    {
        messageT = transform.Find("message").Find("messageT").GetComponent <Text>();
        talking  = transform.Find("Voice").GetComponent <AudioSource>();

        transform.Find("message").GetComponent <Button_UI>().ClickFunc = () =>
        {
            if (tws != null && tws.IsActive())
            {
                tws.WriteAndDestroy();
            }
            else
            {
                if (i <= 12)
                {
                    message = messageArray[i];
                    StartTalkingSound();
                    tws = TextWriting.AddWritingStatic(messageT, message, .05f, true, true, StopTalkingSound);

                    i += 1;
                }
                else
                {
                    float seconds = .4f;
                    StartCoroutine(_wait(seconds));
                    //test();
                }
            }
        };
    }
Exemplo n.º 2
0
    IEnumerator _wait(float time)
    {
        message = messageArray[i];
        StartTalkingSound();
        tws = TextWriting.AddWritingStatic(messageT, message, .05f, true, true, StopTalkingSound);
        yield return(new WaitForSeconds(time));

        SceneManager.LoadScene("MainMenu");
    }
Exemplo n.º 3
0
 private void Start()
 {
     StartTalkingSound();
     tws = TextWriting.AddWritingStatic(messageT, "Hello Folks! \n" + "Just click somewhere inside the bubble to continue …", .05f, true, true, StopTalkingSound);
 }