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.
77 lines
1.3 KiB
77 lines
1.3 KiB
#include "pixelGameEngine.h"
|
|
|
|
using namespace olc;
|
|
|
|
#define WIDTH 640
|
|
#define HEIGHT 480
|
|
|
|
class Example : public olc::PixelGameEngine
|
|
{
|
|
|
|
|
|
public:
|
|
Example()
|
|
{
|
|
sAppName = "Example";
|
|
}
|
|
|
|
public:
|
|
bool OnUserCreate() override
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool OnUserUpdate(float fElapsedTime) override
|
|
{
|
|
std::cout<<"A"<<std::endl;
|
|
Clear(BLACK);
|
|
return true;
|
|
}
|
|
|
|
bool OnUserDestroy()override{
|
|
return true;
|
|
}
|
|
};
|
|
|
|
enum Direction{
|
|
RIGHT,
|
|
DOWN,
|
|
LEFT,
|
|
UP
|
|
};
|
|
|
|
struct Data{
|
|
int x,y;
|
|
};
|
|
|
|
|
|
int main()
|
|
{
|
|
std::vector<int> testList;
|
|
std::cout<<"Test"<<std::endl;
|
|
testList.push_back(1);
|
|
testList.push_back(1);
|
|
testList.push_back(1);
|
|
testList.push_back(1);
|
|
testList.erase(testList.begin());
|
|
std::cout<<testList.size()<<std::endl;
|
|
testList.erase(testList.begin());
|
|
std::cout<<testList.size()<<std::endl;
|
|
testList.erase(testList.begin());
|
|
std::cout<<testList.size()<<std::endl;
|
|
testList.erase(testList.begin());
|
|
std::cout<<testList.size()<<std::endl;
|
|
testList.erase(testList.begin());
|
|
std::cout<<testList.size()<<std::endl;
|
|
testList.erase(testList.begin());
|
|
std::cout<<testList.size()<<std::endl;
|
|
testList.erase(testList.begin());
|
|
std::cout<<testList.size()<<std::endl;
|
|
testList.erase(testList.begin());
|
|
std::cout<<testList.size()<<std::endl;
|
|
Example demo;
|
|
if (demo.Construct(640, 480, 4, 4))
|
|
demo.Start();
|
|
|
|
return 0;
|
|
}
|
|
|