changes in arhitecture, some improvments, much optimising and simplify,
many bagfixes and new graphics engine
This commit is contained in:
27
splashes.h
27
splashes.h
@@ -5,24 +5,41 @@
|
||||
|
||||
class Splashes : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Splashes(Game_Data * gd, QObject *parent = 0);
|
||||
void addSplash( int player, int srcTower, int srcId, QPointF pos, QPointF dest, int aim, QPoint curTower);
|
||||
void delSplash(int Id);
|
||||
void update();
|
||||
void setScene(QGraphicsScene * scene_) {scene = scene_;}
|
||||
|
||||
signals:
|
||||
/// TODO : fix killalien - new function for adding alien in kill list and del aliens in finish update
|
||||
void killAlien(int playerId, int alienId);
|
||||
|
||||
public slots:
|
||||
void addSplash(QPoint towerId);
|
||||
void addSplash(int player, srcSplashType * src, QPointF pos, QPointF dest, int aim = -1);
|
||||
void addSplash(const TowerType &tower);
|
||||
void addSplash(srcTowerType * srctower, int id, QPointF pos, QPointF dest, int aim = -1, QPoint towerId = QPoint(-1,-1));
|
||||
void addSplash(SplashType *spl);
|
||||
|
||||
private:
|
||||
|
||||
QGraphicsScene * scene;
|
||||
Game_Data *gameData;
|
||||
int nextId;
|
||||
struct DeadAlienIndex
|
||||
{
|
||||
DeadAlienIndex(int i, int p) {id = i; player = p;}
|
||||
int player;
|
||||
int id;
|
||||
};
|
||||
QHash <int, DeadAlienIndex> dead;
|
||||
|
||||
void doTriggerOnDest(const SplashType &spl, QList <int> * deadIndexes,
|
||||
void doTriggerOnDest(QHash<int, SplashType>::iterator
|
||||
spl, QList <int> * deadIndexes,
|
||||
bool badAl);
|
||||
void doTriggerOnTimer(SplashType * spl, QList <int> * deadIndexes);
|
||||
void doTriggerOnTimer(QHash<int, SplashType>::iterator
|
||||
spl, QList <int> * deadIndexes);
|
||||
};
|
||||
|
||||
#endif // SPLASHES_H
|
||||
|
||||
Reference in New Issue
Block a user