Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef WALL_HPP
- #define WALL_HPP
- #include "bufftype.hpp"
- //klasa reprezentujaca sciane na planszy. przed stwoerzeniem obiektow tego typu nalezy wczesniej uzyc LoadTexture
- class Wall : public Object
- {
- public:
- //destructible - czy mur jest zniszczalny
- //buff - buff, ktory kryje sie pod murem
- Wall(const sf::Vector2i& pos, bool destructible, const BuffType buff = BuffNone);
- Wall(const Wall& rhs);
- virtual ~Wall();
- /* zwraca true, jezeli tekstura zostanie zaladowana. filename - sciezka do pliku z tekstura */
- static bool LoadTexture(const sf::String& fileName);
- //akcesory
- const BuffType& GetBuffType() const;
- virtual ObjectType GetType() const;
- //funkcje eventow
- virtual void Event1(); //pusty
- virtual void Event2(); //pusty
- //m - mapa, na ktorej bedzie modyfikowana podczas eventu
- virtual void MapEvent1(Map* m); //pusty
- virtual void MapEvent2(Map* m); //pusty
- private:
- //poniewaz sa stale w klasie, przypisanie obiektow nic nie da. dlatego zabraniamy tego
- Wall& operator=(Wall& rhs) {return *this;}
- virtual void SetSprite(); //ustawia odpowiedni sprite
- virtual void draw(sf::RenderTarget &target, sf::RenderStates states) const;
- static sf::Texture myTexture;
- const BuffType myBuffType; //buff, jaki kryje pod soba dana sciana
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement