1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
int n = 0;
if (facex-5 <= itemx+5 && facex+5 >= itemx-5 && facey-5 <= itemy+5 && facey+5 >= itemy-5) {
stage1=false,stage2=true,n++;}
if (facex-5 <= item2x+5 && facex+5 >= item2x-5 && facey-5 <= item2y+5 && facey+5 >= item2y-5) {
stage2=false,stage3=true;n++;}
if (facex-5 <= item3x+5 && facex+5 >= item3x-5 && facey-5 <= item3y+5 && facey+5 >= item3y-5) {
stage3=false,n++;}
do {
if(stage1==true&&n==0){
Drawitem(itemx,itemy,0,255,0 );}
if (stage2==true&&n==1){
Drawitem(item2x,item2y,0,255,0);}
if (stage3==true&&n==2){
Drawitem(item3x,item3y,0,0,255 );
if (facex<400){item3x=item3x+4,item3y=item3y-4;}}
}
while(n<3);
| |