-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshootingSprite.h
More file actions
37 lines (31 loc) · 990 Bytes
/
shootingSprite.h
File metadata and controls
37 lines (31 loc) · 990 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
#ifndef __SHOOTINGSPRITE_H__
#define __SHOOTINGSPRITE_H__
#include <string>
#include <iostream>
#include "multisprite.h"
#include "bullets.h"
class ShootingSprite: public MultiSprite{
public:
ShootingSprite(const string& n);
ShootingSprite(const string& n, const Vector2f& pos, const Vector2f& vel);
ShootingSprite(const ShootingSprite& s);
virtual void update(Uint32 ticks);
virtual void draw() const;
virtual void shoot();
virtual void playershoot();
virtual bool collideWith(const Drawable*) const;
Bullets* getBullets() const {return bullets;}
float getScale() const {return scale;}
void setScale(float s) { scale=s;}
const string& getDirection() const {return direction;}
void setDirection(const string& s) { direction = s;}
virtual ~ShootingSprite(){ delete bullets;}
private:
std::string bulletName;
Bullets* bullets;
float minSpeed;
string direction;
float scale;
ShootingSprite& operator=(const ShootingSprite&);
};
#endif