// // MapAdventureObjectSlide.h // WattsenglishFoodApp // // Created by Katarzyna Kalinowska-Górska on 21/03/2020. // #ifndef MapAdventureObjectSlide_h #define MapAdventureObjectSlide_h #include "IMapAdventureObject.h" #include "AniMapUtils.h" #include "AniJSONParseUtilsMap.h" class MapAdventureObjectSlide : public IMapAdventureObject { public: constexpr static char* const ClassName {const_cast("MapAdventureObjectSlide")}; // init MapAdventureObjectSlide(const rapidjson::Value& p_mapObjectData); // virtuals inline virtual std::vector getOccupiedTiles() const override { return m_occupiedTiles; } virtual std::vector getEntryTiles() const override; // other getters inline const AniMapUtils::TileData& getEntryTile(){return m_entryTile;} inline const AniMapUtils::TileData& getEndStandTile(){return m_endStandTile;} inline const cocos2d::Point& getAnimationStartPoint(){return m_animationStartPoint;} inline const cocos2d::Point& getAnimationEndPoint(){return m_animationEndPoint;} virtual void reset() override {} protected: // props AniMapUtils::TileData m_entryTile; // the tile where the player stands at the beginning AniMapUtils::TileData m_endStandTile; // the tile where the player lands immediately after the slides std::vector m_occupiedTiles; // all the tiles that we can press to approach and start interacting with the slide cocos2d::Point m_animationStartPoint; cocos2d::Point m_animationEndPoint; }; #endif /* MapAdventureObjectSlide_h */