#pragma once
#include "../Basic.h"
#include "Animation.h"
#include <Resource/DataArray.h>
#include <string>
#include <Utils/Point2D.h>
#include <vector>
#include <Utils/Size2D.h>

namespace assets
{
	class ObjectInfo
	{
	public:
		ObjectInfo() {}

		std::string ID;
		ObjectType type;
		gge::utils::Point location;
	};

	class Object
	{
	public:
		Object() {}
		int  load(gge::resource::DataArray &dataArray);
		void findNonPassablePoints(const std::vector<std::string> &given_tileMap);

		AnimationProvider *animation;
		std::string ID;
		gge::utils::Size size;
		std::vector<gge::utils::Point> nonPassablePoints;
	};

	class Obstacle : public Object 
	{
	public:
		static Obstacle &loadNew(gge::resource::DataArray &dataArray)
		{
			Obstacle &obs = *new Obstacle;
			obs.load(dataArray);
			return obs;
		}

		static std::map<std::string, Obstacle*> list;
	};
}
