//
//  World.hpp
//  Game
//
//  Created by Darvydas on 24/01/2019.
//

#ifndef World_hpp
#define World_hpp

#include "cocos2d.h"

#include "Game/GameScene/World/Dialogue.hpp"
#include "Game/GameScene/World/Objects/Tile.hpp"
#include "Game/GameScene/World/Map/House.hpp"
#include "Game/GameScene/World/Objects/Base.hpp"
#include "Game/GameScene/World/Player.hpp"
#include "Game/GameScene/World/Config.hpp"
#include "Game/GameScene/World/Objects/InteractiveObject.hpp"

namespace Game
{
	class CHUD;

    class CWorld: public cocos2d::Sprite {
        
    public:
        
        static CWorld *create(cocos2d::Scene* pcGameScene, CHUD* hud);
        
        void interact();
        
        CPlayer* getPlayer();
        
        Dialogue* m_pcDialogue = nullptr;
        
    private:
        
        void update(const float dt);
        
        void centerCameraOnPlayer();
        
        void createVisualElements(CHUD* hud);
        
        void createHouseElements();
        
    private:
        
        cocos2d::Scene* m_pcGameScene;
        
        std::vector<Objects::CInteractiveObject*> m_vInteractiveObjects;
        
        CPlayer* m_pcPlayer;
        
        Map::CHouse* m_pcHouse;
    };
}

#endif /* World_hpp */
