From 0c4d6493ce9d1215c10d5f2942d373c4f37204b5 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 2 May 2011 20:42:37 +0200 Subject: add eating overlay --- pacman-c++/mainwidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pacman-c++/mainwidget.cpp') diff --git a/pacman-c++/mainwidget.cpp b/pacman-c++/mainwidget.cpp index 3c77765..93fd796 100644 --- a/pacman-c++/mainwidget.cpp +++ b/pacman-c++/mainwidget.cpp @@ -4,6 +4,7 @@ #include "constants.h" #include "util.h" #include "pacman.pb.h" +#include MainWidget::MainWidget(QWidget *parent) : QWidget(parent), m_currentKey(Transmission::none), m_running(false), m_scene(NULL), @@ -173,6 +174,9 @@ void MainWidget::tick() m_scene->updateMap(map); Util::deleteMap(map); updateScore(m_updatepacket); + + if (m_updatepacket.eating_order_size() > 0) + m_scene->showEatingText(); } } @@ -214,6 +218,7 @@ void MainWidget::keyReleaseEvent(QKeyEvent* event) void MainWidget::startGame() { disconnect(AudioManager::self()->audioPlayer(), NULL, this, SLOT(startGame())); + m_scene->showEatingText(false); m_running = true; sendKeyUpdate(); m_ambientPlayer->play(); -- cgit v1.2.3