summaryrefslogtreecommitdiff
path: root/noncore/games/parashoot/helicopter.cpp
Unidiff
Diffstat (limited to 'noncore/games/parashoot/helicopter.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/parashoot/helicopter.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/noncore/games/parashoot/helicopter.cpp b/noncore/games/parashoot/helicopter.cpp
index 0923124..036b21e 100644
--- a/noncore/games/parashoot/helicopter.cpp
+++ b/noncore/games/parashoot/helicopter.cpp
@@ -1,5 +1,5 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
@@ -24,3 +24,3 @@
24 24
25#include <qpe/resource.h> 25#include <qtopia/resource.h>
26 26
@@ -39,3 +39,4 @@ Helicopter::Helicopter(QCanvas* canvas) :
39 h0.replace(QRegExp("0001"),"%1"); 39 h0.replace(QRegExp("0001"),"%1");
40 helicopterarray->readPixmaps(h0,3 ); 40 helicopterarray->readPixmaps(h0,4 );
41
41 setSequence(helicopterarray); 42 setSequence(helicopterarray);
@@ -59,2 +60,10 @@ void Helicopter::advance(int phase)
59 if (phase == 0) { 60 if (phase == 0) {
61 if (frame() == 3) {
62 delete this;
63 return;
64 }
65
66 if (hits >= 2) {
67 setFrame(3);
68 } else {
60 setFrame(fr%3); 69 setFrame(fr%3);
@@ -64,2 +73,3 @@ void Helicopter::advance(int phase)
64} 73}
74}
65 75
@@ -85,6 +95,2 @@ void Helicopter::done()
85 hits++; 95 hits++;
86 if (hits >= 2) {
87 setAnimated(false);
88 delete this;
89 }
90} 96}