I'm implementing a feature which requires to get the pixel values of the screen when a user push a buttom in racing, for each time step.
There might be a piece of code like that:
- {l Code}: {l Select All Code}
for each time step
{
if (keyboradInput[0] == "<-") {
driveLeft();
}
if (keyboradInput[0] == "<-" && keyboradInput[1]=="^") {
driveLeft();
accelerate();
}
...
}
Then I can add a line:
- {l Code}: {l Select All Code}
for each time step
{
if (keyboradInput[0] == "<-") {
driveLeft();
}
if (keyboradInput[0] == "<-" && keyboradInput[1]=="^") {
[R G B] = screenShot();
driveLeft();
accelerate();
}
...
}
So, my questions are
1. Where is the code like the above, reading inputs and driving the kart?
2. Is there a API like screenShot, to get the pixel values of the current frame?