Compare commits
	
		
			No commits in common. "012fb300057d24f2a73f66039e5440b22a14575a" and "f1c254f9280dbf70278529e584715d7ab5ea585b" have entirely different histories. 
		
	
	
		
			012fb30005
			...
			f1c254f928
		
	
		
							
								
								
									
										19
									
								
								bla.py
								
								
								
								
							
							
						
						
									
										19
									
								
								bla.py
								
								
								
								
							|  | @ -18,7 +18,6 @@ FIRE_DELAY = 1000  # Задержка между выстрелами в мил | ||||||
| WHITE = (255, 255, 255) | WHITE = (255, 255, 255) | ||||||
| BLACK = (0, 0, 0) | BLACK = (0, 0, 0) | ||||||
| score = 0 | score = 0 | ||||||
| 
 |  | ||||||
| # Инициализация Pygame | # Инициализация Pygame | ||||||
| pygame.init() | pygame.init() | ||||||
| 
 | 
 | ||||||
|  | @ -46,10 +45,6 @@ explosion_images = [pygame.image.load(f"explosion_{i}.png") for i in range(1, 48 | ||||||
| stoneexplosion_images = [pygame.image.load(f"stoneexplosion_{i}.png") for i in range(1, 6)] | stoneexplosion_images = [pygame.image.load(f"stoneexplosion_{i}.png") for i in range(1, 6)] | ||||||
| menu_background = pygame.transform.scale(pygame.image.load("menu_background.jpg"), (SCREEN_WIDTH, SCREEN_HEIGHT)) | menu_background = pygame.transform.scale(pygame.image.load("menu_background.jpg"), (SCREEN_WIDTH, SCREEN_HEIGHT)) | ||||||
| 
 | 
 | ||||||
| cursor = pygame.image.load("cursor.png") |  | ||||||
| pygame.mouse.set_visible(False) |  | ||||||
| cursor_offset_x = cursor.get_width() // 2 |  | ||||||
| cursor_offset_y = cursor.get_height() // 2 |  | ||||||
| 
 | 
 | ||||||
| class Explosion(pygame.sprite.Sprite): | class Explosion(pygame.sprite.Sprite): | ||||||
|     def __init__(self, x, y): |     def __init__(self, x, y): | ||||||
|  | @ -357,9 +352,6 @@ def draw_menu(): | ||||||
|     quit_rect = quit_text.get_rect(center=(SCREEN_WIDTH // 2, SCREEN_HEIGHT // 2 + 100)) |     quit_rect = quit_text.get_rect(center=(SCREEN_WIDTH // 2, SCREEN_HEIGHT // 2 + 100)) | ||||||
|     screen.blit(quit_text, quit_rect) |     screen.blit(quit_text, quit_rect) | ||||||
| 
 | 
 | ||||||
|     x, y = pygame.mouse.get_pos() |  | ||||||
|     screen.blit(cursor, (x - cursor_offset_x, y - cursor_offset_y)) |  | ||||||
| 
 |  | ||||||
|     pygame.display.flip() |     pygame.display.flip() | ||||||
| 
 | 
 | ||||||
|     return start_rect, settings_rect, quit_rect |     return start_rect, settings_rect, quit_rect | ||||||
|  | @ -393,10 +385,6 @@ def draw_settings_menu(): | ||||||
|     music_rect = music_text.get_rect(center=(SCREEN_WIDTH // 2, SCREEN_HEIGHT // 2 - 100)) |     music_rect = music_text.get_rect(center=(SCREEN_WIDTH // 2, SCREEN_HEIGHT // 2 - 100)) | ||||||
|     screen.blit(music_text, music_rect) |     screen.blit(music_text, music_rect) | ||||||
| 
 | 
 | ||||||
|     x, y = pygame.mouse.get_pos() |  | ||||||
|     screen.blit(cursor, (x - cursor_offset_x, y - cursor_offset_y)) |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     pygame.display.flip() |     pygame.display.flip() | ||||||
| 
 | 
 | ||||||
|     return quit_rect, music_rect |     return quit_rect, music_rect | ||||||
|  | @ -459,9 +447,6 @@ while running: | ||||||
| 
 | 
 | ||||||
|     if not paused:  # If not paused, update game state |     if not paused:  # If not paused, update game state | ||||||
|         # Update sprites |         # Update sprites | ||||||
|         x, y = pygame.mouse.get_pos() |  | ||||||
|         screen.blit(cursor, (x - cursor_offset_x, y - cursor_offset_y)) |  | ||||||
| 
 |  | ||||||
|         all_sprites.update() |         all_sprites.update() | ||||||
| 
 | 
 | ||||||
| 		    # Проверка столкновений пуль с танками | 		    # Проверка столкновений пуль с танками | ||||||
|  | @ -576,10 +561,6 @@ while running: | ||||||
|     pygame.draw.rect(screen, (0, 255, 0), ( |     pygame.draw.rect(screen, (0, 255, 0), ( | ||||||
|     score_rect.topleft, (score_rect.width, score_rect.height)))  # Draw a green rectangle behind the score |     score_rect.topleft, (score_rect.width, score_rect.height)))  # Draw a green rectangle behind the score | ||||||
|     screen.blit(score_text, score_rect.topleft) |     screen.blit(score_text, score_rect.topleft) | ||||||
| 
 |  | ||||||
|     x, y = pygame.mouse.get_pos() |  | ||||||
|     screen.blit(cursor, (x - cursor_offset_x, y - cursor_offset_y)) |  | ||||||
| 
 |  | ||||||
|     pygame.display.flip() |     pygame.display.flip() | ||||||
|     clock.tick(FPS) |     clock.tick(FPS) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								cursor.png
								
								
								
								
							
							
						
						
									
										
											BIN
										
									
								
								cursor.png
								
								
								
								
							
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 2.6 KiB | 
		Loading…
	
		Reference in New Issue