Compare commits
	
		
			No commits in common. "1d03d60ac29c53f9b8392385f1f561e2d8047d47" and "a41ee41fba8f4e24729cb7f3627501935e5a0b0d" have entirely different histories.
		
	
	
		
			1d03d60ac2
			...
			a41ee41fba
		
	
		
					 4 changed files with 10 additions and 14 deletions
				
			
		
							
								
								
									
										1
									
								
								.idea/ideas.txt
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										1
									
								
								.idea/ideas.txt
									
										
									
										generated
									
									
									
								
							|  | @ -38,7 +38,6 @@ Story: | ||||||
|         Henker |         Henker | ||||||
|         armer Bauer |         armer Bauer | ||||||
|         "Hexe" |         "Hexe" | ||||||
|         Patrice, fragt nach Lightning Anschluss -> Lightning Spell freigeschaltet |  | ||||||
| 
 | 
 | ||||||
|     Ziel(e) |     Ziel(e) | ||||||
|         -> Zurückkommen |         -> Zurückkommen | ||||||
|  |  | ||||||
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 11 KiB | 
							
								
								
									
										10
									
								
								classes.py
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								classes.py
									
										
									
									
									
								
							|  | @ -182,16 +182,15 @@ class Scene(GameObjects): | ||||||
|         super().__init__(name, _type, bg, objects, WIDTH, HEIGHT) |         super().__init__(name, _type, bg, objects, WIDTH, HEIGHT) | ||||||
|         self.level = level |         self.level = level | ||||||
|         self.current_level = 0 |         self.current_level = 0 | ||||||
|         self.update() |  | ||||||
| 
 | 
 | ||||||
|     def update(self, change:bool=False, objects=None): |     def update(self, change:bool, objects): | ||||||
|         if change: |         if change: | ||||||
|             self.current_level += 1 |             self.current_level += 1 | ||||||
|         self.level[self.current_level].update(objects) |         self.level[self.current_level].update(objects) | ||||||
|         self.background = self.level[self.current_level].background |         self.background = self.level[self.current_level].background | ||||||
|         """if isinstance(self.objects, list): |         if isinstance(self.objects, list): | ||||||
|             for obj in self.objects[0] + self.objects[1] + self.objects[2]: |             for obj in self.objects[0] + self.objects[1] + self.objects[2]: | ||||||
|                 obj.update()""" |                 obj.update() | ||||||
|          |          | ||||||
|     def draw(self, screen): |     def draw(self, screen): | ||||||
|         if isinstance(self.objects, list): |         if isinstance(self.objects, list): | ||||||
|  | @ -251,8 +250,7 @@ class Room(GameObjects): | ||||||
|         return walls |         return walls | ||||||
| 
 | 
 | ||||||
|     def update(self, objects): |     def update(self, objects): | ||||||
|         if objects is not None: |         self.objects = objects | ||||||
|             self.objects = objects |  | ||||||
|         if not self.objects[1]: |         if not self.objects[1]: | ||||||
|             self.locked = False |             self.locked = False | ||||||
|         return |         return | ||||||
|  |  | ||||||
							
								
								
									
										13
									
								
								main.py
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								main.py
									
										
									
									
									
								
							|  | @ -27,13 +27,12 @@ def quitGame(): | ||||||
|     quit() |     quit() | ||||||
| 
 | 
 | ||||||
| def genRooms(WIDTH, HEIGHT, type:str, objects:list): | def genRooms(WIDTH, HEIGHT, type:str, objects:list): | ||||||
|     room_objects = [] |     room_objects = [Obstacle('dirt', 'boulder', 'art/images/dirt2.png', False, 32, 32, WIDTH=WIDTH - 64, HEIGHT=HEIGHT - 64)] | ||||||
|     #room_objects = [Obstacle('dirt', 'boulder', 'art/images/dirt2.png', False, 32, 32, WIDTH=WIDTH - 64, HEIGHT=HEIGHT - 64)] |     room_objects.append(Obstacle('river', 'water', 'art/images/river1.png', True, 32, 32, WIDTH=WIDTH - 64, HEIGHT=HEIGHT - 64)) | ||||||
|     room_objects.append(Obstacle('river', 'water', 'art/images/river.png', True, random.randint(32, round(WIDTH * 0.75)), 32, WIDTH=96, HEIGHT=round(HEIGHT * 0.66))) |  | ||||||
|     rooms = [ |     rooms = [ | ||||||
|         Room(type, 'normal', f'art/images/{type}.png', [objects[0], objects[1], objects[2], [room_objects[random.randint(0, len(room_objects) - 1)] for i in range(0, random.randint(0, 1))]], WIDTH - 64, HEIGHT - 64, [True, True, True, False], 0), |         Room(type, 'normal', f'art/images/{type}.png', [objects[0], objects[1], objects[2], [room_objects[random.randint(0, len(room_objects) - 1)] for i in range(0, 5)]], WIDTH - 64, HEIGHT - 64, [True, True, True, False], 0), | ||||||
|         Room(type, 'normal', f'art/images/{type}.png', [objects[0], objects[1], objects[2], [room_objects[random.randint(0, len(room_objects) - 1)] for i in range(0, random.randint(0, 1))]], WIDTH - 64, HEIGHT - 64, [True, True, True, False], 1), |         Room(type, 'normal', f'art/images/{type}.png', [objects[0], objects[1], objects[2], [room_objects[random.randint(0, len(room_objects) - 1)] for i in range(0, 5)]], WIDTH - 64, HEIGHT - 64, [True, True, True, False], 1), | ||||||
|         Room(type, 'normal', f'art/images/{type}.png', [objects[0], objects[1], objects[2], [room_objects[random.randint(0, len(room_objects) - 1)] for i in range(0, random.randint(0, 1))]], WIDTH - 64, HEIGHT - 64, [True, True, True, False], 2), |         Room(type, 'normal', f'art/images/{type}.png', [objects[0], objects[1], objects[2], [room_objects[random.randint(0, len(room_objects) - 1)] for i in range(0, 5)]], WIDTH - 64, HEIGHT - 64, [True, True, True, False], 2), | ||||||
|             ] |             ] | ||||||
|     return rooms |     return rooms | ||||||
| 
 | 
 | ||||||
|  | @ -67,6 +66,7 @@ def play(screen, clock, running, background, isblack, WIDTH, HEIGHT): | ||||||
|         screen.blit(bg, (0, 0)) |         screen.blit(bg, (0, 0)) | ||||||
| """  | """  | ||||||
|         if not freeze: |         if not freeze: | ||||||
|  |             scene.update(False, objects) | ||||||
|             objects = scene.getObjects() |             objects = scene.getObjects() | ||||||
|             screen.blit(scene.background, (32, 32)) |             screen.blit(scene.background, (32, 32)) | ||||||
|             for thing in objects[3]: |             for thing in objects[3]: | ||||||
|  | @ -88,7 +88,6 @@ def play(screen, clock, running, background, isblack, WIDTH, HEIGHT): | ||||||
|                 npc.draw(screen) |                 npc.draw(screen) | ||||||
|              |              | ||||||
|             objects[0][0].book.addspell('windslash') |             objects[0][0].book.addspell('windslash') | ||||||
|             scene.update(False, objects) |  | ||||||
| 
 | 
 | ||||||
|          |          | ||||||
|         else: |         else: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue