12345678910111213141516
while (start < 2){ if (stage1 = true){ Drawitem(itemx,itemy,0,255,0 );} if (!stage2){ Drawitem(item2x,item2y,0,255,0 );} if (!stage3){ Drawitem(item3x,item3y,0,0,255 ); if (facex<400){item3x=item3x+4,item3y=item3y-4;}} if (facex-5 <= item2x+5 && facex+5 >= item2x-5 && facey-5 <= item2y+5 && facey+5 >= item2y-5) { stage1=false,stage2=false;} if (facex-5 <= item2x+5 && facex+5 >= item2x-5 && facey-5 <= item2y+5 && facey+5 >= item2y-5) { stage2=true,stage3=false;} if (facex-5 <= item3x+5 && facex+5 >= item3x-5 && facey-5 <= item3y+5 && facey+5 >= item3y-5) { stage3=true;} }
123456789101112131415
if (stage1== true){ Drawitem(itemx,itemy,0,255,0 );} if (facex-5 <= item2x+5 && facex+5 >= item2x-5 && facey-5 <= item2y+5 && facey+5 >= item2y-5) { stage1=false,stage2=false;} if (stage2==false){ Drawitem(item2x,item2y,0,255,0 );} if (facex-5 <= item2x+5 && facex+5 >= item2x-5 && facey-5 <= item2y+5 && facey+5 >= item2y-5) { stage2=true,stage3=false;} if (stage3==false){ Drawitem(item3x,item3y,0,0,255 ); if (facex<400){item3x=item3x+4,item3y=item3y-4;}} if (facex-5 <= item3x+5 && facex+5 >= item3x-5 && facey-5 <= item3y+5 && facey+5 >= item3y-5) { stage3=true;}