Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef TODRAW_H_INCLUDED
- #define TODRAW_H_INCLUDED
- #include <SFML/Graphics.hpp>
- #include <vector>
- #include "Character.h"
- class ToDraw
- {
- public:
- ToDraw()
- {}
- void add(sf::Sprite &pObject)
- {
- sprite->push_back(pObject);
- }
- sf::Sprite getObject(int pI)
- {
- if(sprite->size() >= pI)
- {
- return sprite[pI]; // ici ! je veut retourner la valeur que pointe le pointeur dans le vecteur "sprite"
- }
- else
- {
- std::cout << "demande ToDraw d'object inexistant" << std::endl;
- }
- }
- int getSize(void)
- {
- return sprite->size();
- }
- private:
- std::vector<sf::Sprite> *sprite;
- };
- #endif // TODRAW_H_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement