#pragma once
#include <Resource/DataArray.h>
#include <string>
#include <Engine/Animation.h>
#include <Resource/Folder.h>
#include <vector>
#include <map>

namespace assets
{
	class TileInfo;

	class Tile
	{
	public:
		Tile();
		void load(gge::resource::Folder &folder);

		bool forceNotWalkable;
		gge::animation::RectangularGraphic2DAnimationProvider *graphic;
		TileInfo *parent;
	};

	class TileInfo
	{
	public:
		TileInfo() {}
		void load(gge::resource::Folder &folder);
		static TileInfo &loadNew(gge::resource::Folder &folder)
		{
			TileInfo &t = *new TileInfo;
			t.load(folder);
			return t;
		}

		std::string ID;
		float movementModifier;
		bool isWalkable;

		std::vector<Tile> tiles;

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