forked from InfoProjekt/game
		
	new river sprite file added
new idea lol Signed-off-by: SpagettiFisch <63868515+SpagettiFisch@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									1b6ccb17b0
								
							
						
					
					
						commit
						c3c44bbc71
					
				
					 4 changed files with 14 additions and 10 deletions
				
			
		
							
								
								
									
										1
									
								
								.idea/ideas.txt
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										1
									
								
								.idea/ideas.txt
									
										
									
										generated
									
									
									
								
							|  | @ -38,6 +38,7 @@ Story: | |||
|         Henker | ||||
|         armer Bauer | ||||
|         "Hexe" | ||||
|         Patrice, fragt nach Lightning Anschluss -> Lightning Spell freigeschaltet | ||||
| 
 | ||||
|     Ziel(e) | ||||
|         -> Zurückkommen | ||||
|  |  | |||
							
								
								
									
										
											BIN
										
									
								
								art/images/river.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								art/images/river.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 11 KiB | 
|  | @ -182,15 +182,16 @@ class Scene(GameObjects): | |||
|         super().__init__(name, _type, bg, objects, WIDTH, HEIGHT) | ||||
|         self.level = level | ||||
|         self.current_level = 0 | ||||
|         self.update() | ||||
| 
 | ||||
|     def update(self, change:bool, objects): | ||||
|     def update(self, change:bool=False, objects=None): | ||||
|         if change: | ||||
|             self.current_level += 1 | ||||
|         self.level[self.current_level].update(objects) | ||||
|         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]: | ||||
|                 obj.update() | ||||
|                 obj.update()""" | ||||
|          | ||||
|     def draw(self, screen): | ||||
|         if isinstance(self.objects, list): | ||||
|  | @ -250,6 +251,7 @@ class Room(GameObjects): | |||
|         return walls | ||||
| 
 | ||||
|     def update(self, objects): | ||||
|         if objects is not None: | ||||
|             self.objects = objects | ||||
|         if not self.objects[1]: | ||||
|             self.locked = False | ||||
|  |  | |||
							
								
								
									
										13
									
								
								main.py
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								main.py
									
										
									
									
									
								
							|  | @ -27,12 +27,13 @@ def quitGame(): | |||
|     quit() | ||||
| 
 | ||||
| def genRooms(WIDTH, HEIGHT, type:str, objects:list): | ||||
|     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 = [] | ||||
|     #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/river.png', True, random.randint(32, round(WIDTH * 0.75)), 32, WIDTH=96, HEIGHT=round(HEIGHT * 0.66))) | ||||
|     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, 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, 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, 5)]], 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, 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, 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, random.randint(0, 1))]], WIDTH - 64, HEIGHT - 64, [True, True, True, False], 2), | ||||
|             ] | ||||
|     return rooms | ||||
| 
 | ||||
|  | @ -66,7 +67,6 @@ def play(screen, clock, running, background, isblack, WIDTH, HEIGHT): | |||
|         screen.blit(bg, (0, 0)) | ||||
| """  | ||||
|         if not freeze: | ||||
|             scene.update(False, objects) | ||||
|             objects = scene.getObjects() | ||||
|             screen.blit(scene.background, (32, 32)) | ||||
|             for thing in objects[3]: | ||||
|  | @ -88,6 +88,7 @@ def play(screen, clock, running, background, isblack, WIDTH, HEIGHT): | |||
|                 npc.draw(screen) | ||||
|              | ||||
|             objects[0][0].book.addspell('windslash') | ||||
|             scene.update(False, objects) | ||||
| 
 | ||||
|          | ||||
|         else: | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 SpagettiFisch
						SpagettiFisch