You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SeasonI/trigger.h

42 lines
684 B

#include "pixelGameEngine.h"
using namespace olc;
namespace TriggerName{
enum Trigger{
START_CUTSCENE_1
};
}
class Trigger{
vi2d pos;
vi2d size;
int id;
public:
Trigger(vi2d pos,vi2d size,int id)
:pos(pos),size(size),id(id){}
bool IsInside(vd2d point) {
return point>pos&&point<pos+size;
}
vi2d GetPos() {
return pos;
}
vi2d GetSize() {
return size;
}
int GetPosX() {
return pos.x;
}
int GetPosY() {
return pos.y;
}
int GetSizeX() {
return size.x;
}
int GetSizeY() {
return size.y;
}
int GetID() {
return id;
}
};