-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsunflower.h
44 lines (38 loc) · 1.28 KB
/
sunflower.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef SUNFLOWER_H
#define SUNFLOWER_H
#include <QObject>
#include"plant.h"
#include"globalconfig.h"
class SunFlower : public Plant
{
Q_OBJECT
QString lightmovie;
QString violentlightmovie;
public:
SunFlower(QWidget* parent,int x,int y):Plant(parent,x,y)
{
this->lightmovie=":/resource/images/Plants/SunFlower/SunFlower2.gif";
this->hp=100;
this->bh=0;
this->plantmovie=":/resource/images/Plants/SunFlower/SunFlower1.gif";
this->violentpix=":/resource/images/Plants/TwinSunflower/TwinSunflower1.gif";
this->violentlightmovie=":/resource/images/Plants/TwinSunflower/TwinSunflower2.gif";
this->label=new QLabel(this->parent);
this->movie=new QMovie(plantmovie);
movie->start();
label->setFixedSize(plantwidth,plantheight);
label->setMovie(movie);
label->move((grasscolpos[y]+grasscolpos[y-1])/2-15,grassrowpos[x-1]/3+grassrowpos[x]*2/3-90);
label->show();
this->actcount=10000;
}
void act() override;
void mousePressEvent(QMouseEvent*) override;
void paintEvent(QPaintEvent *) override;
void changelight() override;
void changegeneral() override;
void changenormel() override;
void changeviolent() override;
signals:
};
#endif // SUNFLOWER_H