add an ugly fix to force to draw the player all the time
This commit is contained in:
		
							parent
							
								
									d8ce0f002c
								
							
						
					
					
						commit
						1a46e13708
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -234,7 +234,7 @@ pygame.display.flip() | |||
| globals.moving_objects.add(player) | ||||
| while not globals.die: | ||||
| 	 | ||||
| 	# erase moving objects | ||||
| 	# erase previously moved objects | ||||
| 	globals.moving_objects.clear(globals.screen, globals.background) | ||||
| 	globals.bullets_list.clear(globals.screen, globals.background) | ||||
| 
 | ||||
|  | @ -242,6 +242,9 @@ while not globals.die: | |||
| 	globals.moving_objects.update() | ||||
| 	globals.bullets_list.update() | ||||
| 	 | ||||
| 	# add player (if it's not already in the group). ugly, but ok for now. | ||||
| 	globals.moving_objects.add(player) | ||||
| 
 | ||||
| 	# drawing | ||||
| 	rectlist = globals.moving_objects.draw(globals.screen) | ||||
| 	rectlist.extend(globals.bullets_list.draw(globals.screen)) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 kleph
						kleph