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.
56 lines
631 B
56 lines
631 B
#include "pixelGameEngine.h"
|
|
#include "Polygon.h"
|
|
|
|
using namespace olc;
|
|
|
|
#define WIDTH 640
|
|
#define HEIGHT 480
|
|
|
|
class Example : public olc::PixelGameEngine
|
|
{
|
|
|
|
|
|
public:
|
|
Example()
|
|
{
|
|
sAppName = "Example";
|
|
}
|
|
|
|
public:
|
|
bool OnUserCreate() override
|
|
{
|
|
Polygon poly{{30,30},{20,20},{-7,6}};
|
|
return true;
|
|
}
|
|
|
|
bool OnUserUpdate(float fElapsedTime) override
|
|
{
|
|
Clear(BLACK);
|
|
return true;
|
|
}
|
|
|
|
bool OnUserDestroy()override{
|
|
return true;
|
|
}
|
|
};
|
|
|
|
enum Direction{
|
|
RIGHT,
|
|
DOWN,
|
|
LEFT,
|
|
UP
|
|
};
|
|
|
|
struct Data{
|
|
int x,y;
|
|
};
|
|
|
|
|
|
int main()
|
|
{
|
|
Example demo;
|
|
if (demo.Construct(640, 480, 4, 4))
|
|
demo.Start();
|
|
|
|
return 0;
|
|
}
|
|
|