AdventuresInLestoria/Crawler/ConnectionPoint.h

18 lines
576 B
C
Raw Normal View History

#pragma once
#include "olcUTIL_Geometry2D.h"
struct ConnectionPoint{
geom2d::rect<float>rect;
std::string name;
std::string map;
std::string unlockCondition;
std::array<int,8>neighbors; //Indices into the connectionPoint array.
std::vector<int>spawns;
bool levelDataExists=false;
inline ConnectionPoint(geom2d::rect<float>rect,std::string name,std::string map,std::string unlockCondition,std::vector<int>spawns)
:rect(rect),name(name),map(map),unlockCondition(unlockCondition),spawns(spawns){
neighbors.fill(-1);
}
bool IsNeighbor(ConnectionPoint&testPoint);
};