MapAdventureObjectJumpSpot.h 1.21 KB
//
//  MapAdventureObjectJumpSpot.h
//  WattsenglishFoodApp
//
//  Created by Katarzyna Kalinowska-Górska on 21/03/2020.
//

#ifndef MapAdventureObjectJumpSpot_h
#define MapAdventureObjectJumpSpot_h

#include "IMapAdventureObject.h"
#include "AniMapUtils.h"
#include "AniJSONParseUtilsMap.h"

class MapAdventureObjectJumpSpot : public IMapAdventureObject {
    
public:
    constexpr static char* const ClassName {const_cast<char* const>("MapAdventureObjectJumpSpot")};
    
    // init
    MapAdventureObjectJumpSpot(const rapidjson::Value& p_mapObjectData);
    
    // virtuals
    inline virtual std::vector<AniMapUtils::TileData> getOccupiedTiles() const override { return m_occupiedTiles; }
    virtual std::vector<AniMapUtils::TileData> getEntryTiles()  const override;
    
    // other getters
    inline const AniMapUtils::TileData& getEndStandTile(){return m_endStandTile;}
    virtual void reset() override {}
    
protected:
    // props
    AniMapUtils::TileData m_endStandTile; // the tile where the player lands immediately after the jump
    std::vector<AniMapUtils::TileData> m_occupiedTiles; // the spots where the player might start jumping and land on the end tile
};


#endif /* MapAdventureObjectJumpSpot_h */