Environment interface is as follows:
CodePudding user response:
I guess click the PLAY button position ~ ~ the game can normal open, visible, drawing the image PYGAME mode and the system does not support the black screen, but that should be how to solve this problem? Under the above problem under the WINDOWS, UBUNTU is present,CodePudding user response:
Game started waiting to click on the "PLAY" button, is a black screen,But, the game to start normal again, the figure below:
CodePudding user response:
In chapter 13 13.7 determine which part of the game to run if will determine if stats. Game_active instead if not stats. Game_active, at the same time method in the class ship_hit () method needs to be stats. Game_active to change the value of True, change me is so goodCodePudding user response:
Should be run in 13.7 to determine which parts of the gameWhile True:
Gf. Check_events (ai_settings, screen, ship, bullets)
If stats. Game_active:
The ship. The update ()
Gf. Update_bullets (ai_settings, screen, ship, aliens, bullets)
Gf. Update_aliens (ai_settings, stats, screen, ship, aliens, bullets)
Print (len (bullets))
Gf. Update_screen (ai_settings, screen, stats, ship, aliens, bullets, play_button)
The else:
Gf. Update_screen (ai_settings, screen, stats, ship, aliens, bullets, play_button)