| 1 | /*************************************************************************** |
| 2 | tank.h - description |
| 3 | ------------------- |
| 4 | begin : Fri Dec 29 2000 |
| 5 | copyright : (C) 2000 by Waldemar Baraldi |
| 6 | email : [email protected] |
| 7 | ***************************************************************************/ |
| 8 | |
| 9 | /*************************************************************************** |
| 10 | * * |
| 11 | * This program is free software; you can redistribute it and/or modify * |
| 12 | * it under the terms of the GNU General Public License as published by * |
| 13 | * the Free Software Foundation; either version 2 of the License, or * |
| 14 | * (at your option) any later version. * |
| 15 | * * |
| 16 | ***************************************************************************/ |
| 17 | |
| 18 | #ifndef TANK_H |
| 19 | #define TANK_H |
| 20 | |
| 21 | #include "animatedcanvas.h" |
| 22 | |
| 23 | class Tank: public AnimatedCanvas{ |
| 24 | |
| 25 | public: |
| 26 | |
| 27 | /** Crea una tanque full_level lleno*/ |
| 28 | Tank(unsigned int full_level); |
| 29 | |
| 30 | /** Destructor*/ |
| 31 | ~Tank(); |
| 32 | |
| 33 | /**Disminuye la cantidad en 1.*/ |
| 34 | void decFullLevel(unsigned int amount); |
| 35 | |
| 36 | /** Retorna true si el tanque esta vacio.*/ |
| 37 | bool isEmpty(); |
| 38 | |
| 39 | void paint(VideoManager * vm); |
| 40 | |
| 41 | bool isChanged(); |
| 42 | |
| 43 | void tick(); |
| 44 | |
| 45 | protected: |
| 46 | |
| 47 | static const unsigned int Capacity=2000; |
| 48 | static const unsigned int TankWidth=12; |
| 49 | static const unsigned int TankHeight=180; |
| 50 | |
| 51 | int full_level; |
| 52 | int state; |
| 53 | bool changed; |
| 54 | }; |
| 55 | #endif |
| 56 |