1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #pragma once
- #include <SFML/Graphics.hpp>
- using namespace sf;
- class Map;
- class Player;
- class Bullet: public RectangleShape
- {
- public:
- Bullet(Vector2f position, float angle, int strength);
- void registerMap(Map* map);
- void registerSelf(Player* player);
- void update(float delta);
- bool isDead() const;
- bool isExplosive() const;
- void setColor(Color color);
- void madeByPlayer();
- protected:
- bool _explosive;
- float _speed;
- private:
- Map* _map;
- Player* _self;
- bool _dead;
- int _strength;
- bool _madeByPlayer;
- };
- class RectBullet: public Bullet
- {
- public:
- RectBullet(Vector2f position, float angle, int strength);
- };
- class NukeBullet: public Bullet
- {
- public:
- NukeBullet(Vector2f position, float angle, int strength);
- private:
- Texture _badlyAllocatedTexture;
- };
|