Home > Mobile >  Why don't prompt box display
Why don't prompt box display

Time:11-21

I set the stop=0 when the game started, when death, after the stop=1 game and pop-up prompts, why now role death, prompt box after picture has stopped no popup??

The main code:

/////////
Public class MainActivity extends AppCompatActivity {

@ Override
Protected void onCreate (Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

New AlertDialog. Builder (this)
SetTitle (" task profile: ")
SetMessage (" your goal: spongebob squarepants "+" to avoid the same square ", "kill crest increase attack")
SetPositiveButton (" oh yeah ", null)
SetNegativeButton (" van ", null)
The show ();
If (hj. Stop==0)
The setContentView (new hua (this));
The else {
New AlertDialog. Builder (this)
SetTitle (" you got: "+ my. Js)
SetMessage (" what are you playing games like CXK ")
SetPositiveButton (" to to the rightness I very vegetables, "new DialogInterface. An OnClickListener () {
@ Override
Public void onClick (DialogInterface dialog, int which) {
Hj. Stop=0;
}
})
SetNegativeButton (" play games to eating delicacies ", null)
The show ();

}


}
///////////
//here is only a code stop=1, is the role of death, the rest just involve the if (stop==1) break;
///////////
The class myhj extends hj implements Runnable {//my plane

Public myfj () {
W=h=200 * my. Bili;
Your setX (my. W/2 - w/2);
SetY (my) h * 0.7 f - h/2);
Img=my. Myfj;
My. List. Add (this);
My. Mylist. Add (this);
New Thread (this). The start ();//thread of firing bullets
}

@ Override
Public void the run () {
While (hppl> 0 {
//90 milliseconds fired a single shot
Try {thread.sleep (90); } catch InterruptedException (e) {e.p rintStackTrace (); }
New myzd (this);
}
My. List. Remove (this);
My. Mylist. Remove (this);
Stop=1;
}
}
///////////

CodePudding user response:

You hit a breakpoint go to see the value of the stop code

CodePudding user response:

Have problems to their first breakpoint debugging
  • Related