Example #1
0
    public void VerificarErros()
    {
        fixables   = GameObject.FindGameObjectsWithTag("fixables");
        cleanables = GameObject.FindGameObjectsWithTag("cleanables");

        foreach (GameObject objeto in fixables)//se houver algum false, set somethingStillNotFixed = true e sai do loop
        {
            if (objeto.GetComponent <ChangeSprite>().isFixed == true)
            {
                somethingStillNotFixed = false;
            }
            else
            {
                somethingStillNotFixed = true;
                break;
            }
        }

        foreach (GameObject objeto in cleanables)//se houver algum false, set somethingStillNotCleaned = true e sai do loop
        {
            if (objeto.GetComponent <DeactivateOnClick>().isCleaned == true)
            {
                somethingStillNotClean = false;
            }
            else
            {
                somethingStillNotClean = true;
                break;
            }
        }

        if (somethingStillNotFixed == true || somethingStillNotClean == true)
        {
            TextPanelController.CreateDialogBox(dialogoAindaTemErros, texture);
        }
        else
        {
            TextPanelController.ChatEndNotification += ErrosCorrigidos;//subscribe to event (avisa ao terminar os dialogos)
            TextPanelController.CreateDialogBox(dialogoTudoCerto, texture);
        }
    }
 void Start()
 {
     TextPanelController.ChatEndNotification += ChatEnded;//subscribe to event (avisa ao terminar os dialogos)
     TextPanelController.CreateDialogBox(dialogos, texture, true);
 }
Example #3
0
 void Start()
 {
     TextPanelController.CreateDialogBox(dialogoInicial, texture);
 }