Exemplo n.º 1
0
        protected void end_dialog()
        {
            current_emiter_dialog.hide();
            current_receptor_dialog.hide();

            current_emiter.unblock();
            current_receptor.unblock();
            current_emiter          = null;
            current_receptor        = null;
            current_emiter_dialog   = null;
            current_receptor_dialog = null;
            current_dialog          = null;
            on_dialog = false;
        }
Exemplo n.º 2
0
 protected void move_next_message()
 {
     if (messages.MoveNext())
     {
         current_dialog.hide();
         pomodore_next_message.reset();
         current_dialog = who_talk(messages.Current);
         current_dialog.show();
         current_dialog.start_dialog(messages.Current);
     }
     else
     {
         current_dialog = null;
     }
 }
Exemplo n.º 3
0
        protected void start_dialoge(Controller emiter, Controller receptor)
        {
            debug.log("iniciando dialogo de {0} con {1}", emiter, receptor);
            current_emiter          = emiter;
            current_receptor        = receptor;
            current_emiter_dialog   = get_bubble(emiter);
            current_receptor_dialog = get_bubble(receptor);
            emiter.block();
            receptor.block();
            on_dialog = true;
            pomodore_next_message.reset();

            if (!current_emiter_dialog)
            {
                debug.error("no se encontro el dialogo del emisor");
                end_dialog();
            }

            if (!current_receptor_dialog)
            {
                debug.error("no se encontro el dialogo del receptor");
                end_dialog();
            }

            current_receptor_dialog.hide();
            current_emiter_dialog.hide();

            messages = dialogue.messages.GetEnumerator();
            if (!messages.MoveNext())
            {
                end_dialog();
                debug.error("el dialogo no tiene mensajes {0}", dialogue);
                return;
            }

            unseek();

            current_dialog = who_talk(messages.Current);
            current_dialog.show();
            current_dialog.start_dialog(messages.Current);
        }