//Back of BR & TR mirror
if((getpixel(backBuffer,X-1,Y) == makecol(0,255,0)) && (getpixel(backBuffer,X-1,Y+10) == makecol(0,255,0)))
{
if( (getpixel(backBuffer,X-21,Y+20) == makecol(0,255,0) || getpixel(backBuffer,X-21, Y+10) == makecol(0,255,0))
|| (getpixel(backBuffer,X-21,Y) == makecol(0,255,0) || getpixel(backBuffer,X-21, Y-10) == makecol(0,255,0))
)
{
directionx = 0;
directiony = 0;
}
}
I also pass the target to hit into the bounding box collision function, to see if the player has hit it. If the beam has hit the yellow target box, the level has been won. However, if the direction of the beam is = 0,0, and the target hasn't been hit, the user has failed the level.


Level has been failed
No comments:
Post a Comment