]> khamidou — GitHub mirrors - Bug_Attack.git/commitdiff
ajouté un bouton pause
authorkhamidou <khamidou@gmail.com>
Sat, 28 May 2011 16:46:42 +0000 (18:46 +0200)
committerkhamidou <khamidou@gmail.com>
Sat, 28 May 2011 16:46:42 +0000 (18:46 +0200)
Bug_Attack.pro.user
defenser.cpp
defenser.h
enemyfactory.cpp
enemyfactory.h
mainwindow.cpp
mainwindow.h
mainwindow.ui
map.cpp
map.h

index 356980e47faba17092ec841a25a7c98569da4ac7..3e15d28210f60bd573ea16110ad45717143c7732 100644 (file)
 <!DOCTYPE QtCreatorProject>
 <qtcreator>
  <data>
-  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <variable>RunConfiguration0-BaseEnvironmentBase</variable>
+  <value type="int">2</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-CommandLineArguments</variable>
+  <valuelist type="QVariantList"/>
+ </data>
+ <data>
+  <variable>RunConfiguration0-ProFile</variable>
+  <value type="QString">Bug_Attack.pro</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-RunConfiguration.name</variable>
+  <value type="QString">Bug_Attack</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UseDyldImageSuffix</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UseTerminal</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserEnvironmentChanges</variable>
+  <valuelist type="QVariantList"/>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserSetName</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserSetWorkingDirectory</variable>
+  <value type="bool">false</value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-UserWorkingDirectory</variable>
+  <value type="QString"></value>
+ </data>
+ <data>
+  <variable>RunConfiguration0-type</variable>
+  <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ </data>
+ <data>
+  <variable>activeRunConfiguration</variable>
   <value type="int">0</value>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <variable>activebuildconfiguration</variable>
+  <value type="QString">Debug</value>
+ </data>
+ <data>
+  <variable>buildConfiguration-Debug</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <value key="QtVersionId" type="int">0</value>
+   <value key="ToolChain" type="int">0</value>
+   <value key="addQDumper" type=""></value>
+   <value key="buildConfiguration" type="int">2</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildConfiguration-Release</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+   <value key="QtVersionId" type="int">0</value>
+   <value key="addQDumper" type=""></value>
+   <value key="buildConfiguration" type="int">0</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-buildstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <valuelist key="abstractProcess.Environment" type="QVariantList">
+    <value type="QString">COLORTERM=gnome-terminal</value>
+    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-4ATZ8FsiM4,guid=b3b5e8064b425952320809474de0d837</value>
+    <value type="QString">DEFAULTS_PATH=/usr/share/gconf/wmii.default.path</value>
+    <value type="QString">DESKTOP_SESSION=wmii</value>
+    <value type="QString">DISPLAY=:0.0</value>
+    <value type="QString">DVDCSS_CACHE=/home/karim/.dvdcss/</value>
+    <value type="QString">DVDCSS_METHOD=key</value>
+    <value type="QString">DVDCSS_RAW_DEVICE=/dev/rdvd</value>
+    <value type="QString">DVDCSS_VERBOSE=0</value>
+    <value type="QString">EDITOR=emacs -nw</value>
+    <value type="QString">GDMSESSION=wmii</value>
+    <value type="QString">GDM_KEYBOARD_LAYOUT=fr       oss</value>
+    <value type="QString">GDM_LANG=fr_FR.utf8</value>
+    <value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-lbcNed</value>
+    <value type="QString">GNOME_KEYRING_PID=1553</value>
+    <value type="QString">GROUP=karim</value>
+    <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+    <value type="QString">HOME=/home/karim</value>
+    <value type="QString">HOST=darkstar</value>
+    <value type="QString">HOSTTYPE=i486-linux</value>
+    <value type="QString">LANG=fr_FR.utf8</value>
+    <value type="QString">LANGUAGE=</value>
+    <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
+    <value type="QString">LESS=-Q</value>
+    <value type="QString">LOGNAME=karim</value>
+    <value type="QString">MACHTYPE=i486</value>
+    <value type="QString">MANDATORY_PATH=/usr/share/gconf/wmii.mandatory.path</value>
+    <value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-karim</value>
+    <value type="QString">OSTYPE=linux</value>
+    <value type="QString">PATH=/usr/bin:/home/karim/proglangs/go/bin:/home/karim/usrbin:/home/karim/proglangs/go/bin:/home/karim/usrbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
+    <value type="QString">PWD=/home/karim/Documents/Cours/LO21/projet/Bug_Attack</value>
+    <value type="QString">QTDIR=/usr/share/qt4</value>
+    <value type="QString">REMOTEHOST=</value>
+    <value type="QString">SHELL=/bin/tcsh</value>
+    <value type="QString">SHLVL=2</value>
+    <value type="QString">SPEECHD_PORT=7560</value>
+    <value type="QString">SSH_AGENT_PID=1606</value>
+    <value type="QString">SSH_AUTH_SOCK=/tmp/ssh-WHnVlH1571/agent.1571</value>
+    <value type="QString">TERM=xterm</value>
+    <value type="QString">USER=karim</value>
+    <value type="QString">USERNAME=karim</value>
+    <value type="QString">VENDOR=intel</value>
+    <value type="QString">VISUALWORKS=/home/karim/vw7.7.1nc</value>
+    <value type="QString">WINDOWID=35651588</value>
+    <value type="QString">WMII_9MENU=wmii9menu -font 'fixed' -nf '#888888' -nb '#222222' -sf '#ffffff' -sb '#285577' -br '#4c7899'</value>
+    <value type="QString">WMII_ADDRESS=unix!/tmp/ns.karim.:0/wmii</value>
+    <value type="QString">WMII_CONFPATH=/home/karim/.wmii-3.5:/etc/X11/wmii-3.5</value>
+    <value type="QString">WMII_FOCUSCOLORS=#ffffff #285577 #4c7899</value>
+    <value type="QString">WMII_FONT=fixed</value>
+    <value type="QString">WMII_MENU=dmenu -b -fn 'fixed' -nf '#888888' -nb '#222222' -sf '#ffffff' -sb '#285577'</value>
+    <value type="QString">WMII_NORMCOLORS=#888888 #222222 #333333</value>
+    <value type="QString">WMII_NS_DIR=/tmp/ns.karim.:0</value>
+    <value type="QString">WMII_TERM=x-terminal-emulator</value>
+    <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-karim-ZS7TdS/database</value>
+    <value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-wmii:/etc/xdg</value>
+    <value type="QString">XDG_SESSION_COOKIE=8d773db3cd1c3e1862d910494c27a514-1306581046.982572-757318715</value>
+    <value type="QString">no_proxy=0.0.0.0, 127.0.0.1, localhost</value>
+   </valuelist>
+   <valuelist key="abstractProcess.arguments" type="QVariantList">
+    <value type="QString">/home/karim/Documents/Cours/LO21/projet/Bug_Attack/Bug_Attack.pro</value>
+    <value type="QString">-spec</value>
+    <value type="QString">linux-g++</value>
+    <value type="QString">-r</value>
+    <value type="QString">CONFIG+=debug</value>
+   </valuelist>
+   <value key="abstractProcess.command" type="QString">/usr/bin/qmake-qt4</value>
+   <value key="abstractProcess.enabled" type="bool">false</value>
+   <value key="abstractProcess.workingDirectory" type="QString">/home/karim/Documents/Cours/LO21/projet/Bug_Attack</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Debug-buildstep1</variable>
   <valuemap type="QVariantMap">
-   <value key="EditorConfiguration.Codec" type="QByteArray">System</value>
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <valuelist key="abstractProcess.Environment" type="QVariantList">
+    <value type="QString">COLORTERM=gnome-terminal</value>
+    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-4ATZ8FsiM4,guid=b3b5e8064b425952320809474de0d837</value>
+    <value type="QString">DEFAULTS_PATH=/usr/share/gconf/wmii.default.path</value>
+    <value type="QString">DESKTOP_SESSION=wmii</value>
+    <value type="QString">DISPLAY=:0.0</value>
+    <value type="QString">DVDCSS_CACHE=/home/karim/.dvdcss/</value>
+    <value type="QString">DVDCSS_METHOD=key</value>
+    <value type="QString">DVDCSS_RAW_DEVICE=/dev/rdvd</value>
+    <value type="QString">DVDCSS_VERBOSE=0</value>
+    <value type="QString">EDITOR=emacs -nw</value>
+    <value type="QString">GDMSESSION=wmii</value>
+    <value type="QString">GDM_KEYBOARD_LAYOUT=fr       oss</value>
+    <value type="QString">GDM_LANG=fr_FR.utf8</value>
+    <value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-lbcNed</value>
+    <value type="QString">GNOME_KEYRING_PID=1553</value>
+    <value type="QString">GROUP=karim</value>
+    <value type="QString">GTK_MODULES=canberra-gtk-module</value>
+    <value type="QString">HOME=/home/karim</value>
+    <value type="QString">HOST=darkstar</value>
+    <value type="QString">HOSTTYPE=i486-linux</value>
+    <value type="QString">LANG=fr_FR.utf8</value>
+    <value type="QString">LANGUAGE=</value>
+    <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
+    <value type="QString">LESS=-Q</value>
+    <value type="QString">LOGNAME=karim</value>
+    <value type="QString">MACHTYPE=i486</value>
+    <value type="QString">MANDATORY_PATH=/usr/share/gconf/wmii.mandatory.path</value>
+    <value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-karim</value>
+    <value type="QString">OSTYPE=linux</value>
+    <value type="QString">PATH=/usr/bin:/home/karim/proglangs/go/bin:/home/karim/usrbin:/home/karim/proglangs/go/bin:/home/karim/usrbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
+    <value type="QString">PWD=/home/karim/Documents/Cours/LO21/projet/Bug_Attack</value>
+    <value type="QString">QTDIR=/usr/share/qt4</value>
+    <value type="QString">REMOTEHOST=</value>
+    <value type="QString">SHELL=/bin/tcsh</value>
+    <value type="QString">SHLVL=2</value>
+    <value type="QString">SPEECHD_PORT=7560</value>
+    <value type="QString">SSH_AGENT_PID=1606</value>
+    <value type="QString">SSH_AUTH_SOCK=/tmp/ssh-WHnVlH1571/agent.1571</value>
+    <value type="QString">TERM=xterm</value>
+    <value type="QString">USER=karim</value>
+    <value type="QString">USERNAME=karim</value>
+    <value type="QString">VENDOR=intel</value>
+    <value type="QString">VISUALWORKS=/home/karim/vw7.7.1nc</value>
+    <value type="QString">WINDOWID=35651588</value>
+    <value type="QString">WMII_9MENU=wmii9menu -font 'fixed' -nf '#888888' -nb '#222222' -sf '#ffffff' -sb '#285577' -br '#4c7899'</value>
+    <value type="QString">WMII_ADDRESS=unix!/tmp/ns.karim.:0/wmii</value>
+    <value type="QString">WMII_CONFPATH=/home/karim/.wmii-3.5:/etc/X11/wmii-3.5</value>
+    <value type="QString">WMII_FOCUSCOLORS=#ffffff #285577 #4c7899</value>
+    <value type="QString">WMII_FONT=fixed</value>
+    <value type="QString">WMII_MENU=dmenu -b -fn 'fixed' -nf '#888888' -nb '#222222' -sf '#ffffff' -sb '#285577'</value>
+    <value type="QString">WMII_NORMCOLORS=#888888 #222222 #333333</value>
+    <value type="QString">WMII_NS_DIR=/tmp/ns.karim.:0</value>
+    <value type="QString">WMII_TERM=x-terminal-emulator</value>
+    <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-karim-ZS7TdS/database</value>
+    <value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-wmii:/etc/xdg</value>
+    <value type="QString">XDG_SESSION_COOKIE=8d773db3cd1c3e1862d910494c27a514-1306581046.982572-757318715</value>
+    <value type="QString">no_proxy=0.0.0.0, 127.0.0.1, localhost</value>
+   </valuelist>
+   <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value>
+   <valuelist key="abstractProcess.arguments" type="QVariantList">
+    <value type="QString">-w</value>
+   </valuelist>
+   <value key="abstractProcess.command" type="QString">/usr/bin/make</value>
+   <value key="abstractProcess.enabled" type="bool">true</value>
+   <value key="abstractProcess.workingDirectory" type="QString">/home/karim/Documents/Cours/LO21/projet/Bug_Attack</value>
   </valuemap>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.Target.0</variable>
+  <variable>buildconfiguration-Debug-cleanstep0</variable>
   <valuemap type="QVariantMap">
-   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
-   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
-   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
-   <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
-   <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
-    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
-     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
-     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
-     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
-    </valuemap>
-    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
-     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
-     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
-     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
-     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
-     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
-    </valuemap>
-    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
-    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
-     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
-     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
-     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
-     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
-      <value type="QString">clean</value>
-     </valuelist>
-     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
-    </valuemap>
-    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
-    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
-    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
-    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
-    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/clement/Projects/Bug_Attack-build-desktop</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
-   </valuemap>
-   <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
-    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
-     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
-     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
-     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
-    </valuemap>
-    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
-     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
-     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
-     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
-     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
-     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
-    </valuemap>
-    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
-    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
-     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
-     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
-     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
-     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
-      <value type="QString">clean</value>
-     </valuelist>
-     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
-    </valuemap>
-    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
-    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
-    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
-    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
-    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/clement/Projects/Bug_Attack-build-desktop</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
-   </valuemap>
-   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
-   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
-    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Bug_Attack</value>
-    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
-    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">Bug_Attack.pro</value>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
-    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
-   </valuemap>
-   <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+   <value key="cleanConfig" type="bool">true</value>
+   <valuelist key="makeargs" type="QVariantList">
+    <value type="QString">clean</value>
+   </valuelist>
   </valuemap>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.TargetCount</variable>
-  <value type="int">1</value>
+  <variable>buildconfiguration-Release-buildstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Release-buildstep1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfiguration-Release-cleanstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildconfigurations</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">Debug</value>
+   <value type="QString">Release</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>buildstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+   <value key="mkspec" type="QString"></value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildstep1</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>buildsteps</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">trolltech.qt4projectmanager.qmake</value>
+   <value type="QString">trolltech.qt4projectmanager.make</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>cleanstep0</variable>
+  <valuemap type="QVariantMap">
+   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+   <value key="clean" type="bool">true</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>cleansteps</variable>
+  <valuelist type="QVariantList">
+   <value type="QString">trolltech.qt4projectmanager.make</value>
+  </valuelist>
+ </data>
+ <data>
+  <variable>defaultFileEncoding</variable>
+  <value type="QByteArray">System</value>
  </data>
  <data>
-  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
-  <value type="int">4</value>
+  <variable>project</variable>
+  <valuemap type="QVariantMap"/>
  </data>
 </qtcreator>
index 38719d0f131e29877012637119b364a8d59a3ec9..11fed1d89c1e8187f7d95e8b760337664992f9e3 100644 (file)
@@ -39,7 +39,7 @@ void Defenser::setIsShooting(bool state) {
         // Change l'aspect visuel
         this->setOpacity(0.5f); // TEST = TIR ACTIVÉ
         // Active le timer
-        _shootTimer.start(100*_rate);
+        //_shootTimer.start(100*_rate);
     }
     // MODE TIR DESACTIVÉ
     else
@@ -47,7 +47,7 @@ void Defenser::setIsShooting(bool state) {
         // Change l'aspect visuel
         this->setOpacity(1.0f); // TEST = TIR ACTIVÉ
         // Désactive le timer
-        _shootTimer.stop();
+        //_shootTimer.stop();
     }
 }
 
@@ -61,10 +61,12 @@ WaterGun::WaterGun(int posx,int posy,int level,Map* map)
 {
     // Type de cible
     _target = TYPE::T_RAMPANT & TYPE::T_VOLANT;
+    _shootTimerStep = 0;
+    _rate = 4 - _level/2;
     // Caractéristiques
     this->updateStats();
 
-    QObject::connect(&_shootTimer,SIGNAL(timeout()),this,SLOT(shootTarget()));
+    QObject::connect(&map->gameTimer,SIGNAL(timeout()), this,SLOT(shootTarget()));
 }
 
 int WaterGun::getCost(int level) const{
@@ -136,7 +138,6 @@ void WaterGun::paint(QPainter *painter, const QStyleOptionGraphicsItem *,QWidget
 }
 
 void WaterGun::advance(int phase) {
-
     if(!phase)
         return;
 
@@ -173,6 +174,15 @@ void WaterGun::advance(int phase) {
 } // eom
 
 void WaterGun::shootTarget(void) {
+    if (!isShooting())
+        return;
+
+    _shootTimerStep+= 1; /* pas très sur de ça */
+
+    if (_shootTimerStep < (GAME::FPS / _rate))
+        return;
+
+    _shootTimerStep = 0;
 
     // Créé un nouveau projectile au niveau du centre de la tourelle
     Projectile* shot = new Projectile(this->x()+14,this->y()+14,_targetX,_targetY,5,_power, _map);
index e37d8f4eb51dca4055698da05c03f82e92bd7fd0..c53ddc8ff86892fdd58fe752988d883a3718e866 100644 (file)
@@ -28,10 +28,10 @@ public:
 protected:
     virtual void updateStats(void) = 0;
 
-    QTimer _shootTimer;
+    int _shootTimerStep;
     int _level;
     int _target; // combinaison de TYPE::ENTITY
-    int _rate;
+    float _rate;
     float _range;
     int _power;
     float _targetX;
index 6cce601231b1c80f00e27c25358491c2759aa986..0136f38d094104b12ba471c1bd0fe7d96e46a2a4 100644 (file)
@@ -90,8 +90,7 @@ EnemyFactory::EnemyFactory(Map* map):_currentMap(map)
     // Ferme le fichier
     file.close();
 
-
-    connect(&_popTimer,SIGNAL(timeout()),this,SLOT(produceWave(void)));
+    _waveTimerStep = 0;    
 }
 
 void EnemyFactory::productEnemy(WaveElement* enemy){
@@ -129,14 +128,18 @@ void EnemyFactory::launchWaves(void){
     // Désactive le bouton de lancement de vague ennemie
     emit setLaunchWaveButtonEnabled(false);
     // Lance la production
-    _popTimer.start(1);
+    connect(&_currentMap->gameTimer,SIGNAL(timeout()),this,SLOT(produceWave(void)));
 }
 
 void EnemyFactory::produceWave(void){
+    _waveTimerStep+= 1; /* pas très sur de ça */
+
+    if (_waveTimerStep < (GAME::FPS / 2)) // FIXME : ajuster la vitesse.
+        return;
 
+    _waveTimerStep = 0;
     // Vérifie s'il reste des vagues à produire
-    if(_mapWaves.empty()){
-        _popTimer.stop();
+    if(_mapWaves.empty()){      
         return;
     }
 
@@ -144,8 +147,7 @@ void EnemyFactory::produceWave(void){
     if(_mapWaves.first()->isFinished()){
 
         // Charge la vague suivante
-        _mapWaves.pop_front();
-        _popTimer.stop();
+        _mapWaves.pop_front();        
 
         // Ré-active le bouton de lancement de vague ennemie
         // ... s'il reste encore des vagues à lancer
@@ -153,6 +155,7 @@ void EnemyFactory::produceWave(void){
             emit setLaunchWaveButtonEnabled(true);
             //.. et affiche le contenu de la prochaine vague
             this->getNextWaveDesc();
+            disconnect(&_currentMap->gameTimer,SIGNAL(timeout()),this,SLOT(produceWave(void)));
         }
 
         return;
@@ -160,8 +163,7 @@ void EnemyFactory::produceWave(void){
 
     // Produit le contenu de cette vague
     WaveElement* nextEnemy = _mapWaves.first()->popNextWaveElement();
-    if(nextEnemy != NULL) { // sécurité (TODO facultatif ?)
-        _popTimer.setInterval(100*nextEnemy->getFrequence());
+    if(nextEnemy != NULL) { // sécurité (TODO facultatif ?)        
         this->productEnemy(nextEnemy);
     }
 }
index c137a80ff44ed8a091283c2b5c7a7c163a117d7a..c38ba03a2d35d2956d2ff64bfdb2c9de16558b3a 100644 (file)
@@ -16,7 +16,7 @@ class WaveElement
     TYPE::ENEMY _type;
     float _size;
     int _number;
-    int _frequence;
+    int _frequence;    
 
 public:
 
@@ -47,8 +47,8 @@ class EnemyFactory : public QObject
     Q_OBJECT
 
     QList<Wave*> _mapWaves;
-    Map* _currentMap;
-    QTimer _popTimer;
+    Map* _currentMap;    
+    float _waveTimerStep;
 
     void productEnemy(WaveElement* enemy);
 
index 4fb2534a0b949c962fcd23b67aa96b88441e4328..af09f338eacd2c6721daceadecd12d1ea0f4d507 100644 (file)
@@ -30,9 +30,6 @@ MainWindow::MainWindow(QWidget *parent) :
 
     _view->show();
 
-    // Lancement du timer (boucle principale du jeu)
-    QObject::connect(&timer, SIGNAL(timeout()), _sceneMap, SLOT(advance()));
-    timer.start(1000 / GAME::FPS);
 
     /**
     * Interface graphique
@@ -81,7 +78,7 @@ MainWindow::MainWindow(QWidget *parent) :
     // Affichage d'un menu de choix de tourelle au clic droit sur la map
     _view->setContextMenuPolicy(Qt::CustomContextMenu);
     QObject::connect(_view,SIGNAL(customContextMenuRequested(const QPoint&)),this,SLOT(showMapContextMenu(const QPoint&)));
-
+    QObject::connect(ui->pauseButton,SIGNAL(clicked()), _sceneMap,SLOT(setPause(void)));
 }
 
 void MainWindow::showMapContextMenu(const QPoint& pos) {
index fe32063a7492f91fce9edbecde599909f2093547..69abdae5a9947247daf875229a47d89c95733ebc 100644 (file)
@@ -23,8 +23,7 @@ class MainWindow : public QMainWindow
 
     Ui::MainWindow *ui;
 
-    QGraphicsView *_view;
-    QTimer timer;
+    QGraphicsView *_view;  
     Map* _sceneMap;
     Player* _player;
 
index 18fadfcc67d6cfb7acffb46aebf7fd93eef91b3a..f1730630df7d558b80739d67e4d3cd21e4ff89ce 100644 (file)
      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
     </property>
    </widget>
+   <widget class="QPushButton" name="pauseButton">
+    <property name="geometry">
+     <rect>
+      <x>50</x>
+      <y>560</y>
+      <width>80</width>
+      <height>26</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Pause</string>
+    </property>
+   </widget>
   </widget>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
diff --git a/map.cpp b/map.cpp
index 22c91f9512971cb25d432ebde8078554a63ad625..90a1f9e63a0cdc4b343ac7edaa06a7db67c16cd4 100644 (file)
--- a/map.cpp
+++ b/map.cpp
@@ -31,6 +31,9 @@ Map::Map(QWidget *parent,Player* player):QGraphicsScene(parent),_player(player)
 
     // Générateur de vagues
     _waveGenerator = new EnemyFactory(this);
+    // Lancement du timer (boucle principale du jeu)
+    QObject::connect(&gameTimer, SIGNAL(timeout()), this, SLOT(advance()));
+    gameTimer.start(1000 / GAME::FPS);
 }
 
 
@@ -226,3 +229,13 @@ void Map::upgradeTurret(void) {
 QPoint Map::getStart(void) const { return _startPos; }
 Tile& Map::getTileAt(int grid_x, int grid_y) const { return *_mapTiles[grid_x][grid_y]; }
 EnemyFactory* Map::getWaveGenerator(void) const { return _waveGenerator; }
+
+void Map::setPause(void) {
+    if (_isPause) {
+        _isPause = false;
+        gameTimer.stop();
+    } else {
+        _isPause = true;
+        gameTimer.start(1000 / GAME::FPS);
+    }
+}
diff --git a/map.h b/map.h
index 0a8f25eda6b5c7d68e48dbcec0ac46cec9930ada..3f717c937085078c4e1be1dbc64e27180a964bb1 100644 (file)
--- a/map.h
+++ b/map.h
@@ -31,11 +31,13 @@ class Map : public QGraphicsScene
     QGraphicsScene* _scene;
     QPoint _startPos;
     Player* _player;
+    bool _isPause;
 
     void mousePressEvent(QGraphicsSceneMouseEvent *event);
 
 
 public:
+    QTimer gameTimer;
     Map(QWidget* parent,Player* player);
     void addEnemy(Enemy* enemy);
     bool addTurretAt(TYPE::TURRET turretType,float mx,float my);
@@ -50,6 +52,7 @@ public slots:
     void removeEnemy(Enemy* ptr);
     void removeTurret(void);
     void upgradeTurret(void);
+    void setPause(void);
 
 signals :
     void turretInfosRequest(QString);