-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathSundew.cpp
More file actions
39 lines (31 loc) · 693 Bytes
/
Sundew.cpp
File metadata and controls
39 lines (31 loc) · 693 Bytes
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
#include "Sundew.h"
#include <iostream>
using namespace std;
#include <SFML/Graphics.hpp>
sf::Texture* Sundew::texture = NULL;
Sundew::Sundew()
{
}
Sundew::Sundew(double m): Plant(m)
{
}
Sundew::Sundew(double m, int _x, int _y): Plant(m, _x, _y)
{
}
Sundew::~Sundew()
{
}
// Sundews wait for insects but to no avail.
// They are angry and vicious and definitely not talkative.
// I asked the cats and they grudgingly agreed to help you.
void Sundew::setSprite()
{
if (!texture)
{
texture = new sf::Texture;
if (!texture->loadFromFile("res/sundew.png"))
cout <<"Sundew went wrong" <<endl;
}
s = new sf::Sprite;
s->setTexture(*texture);
}