changed stuff
Signed-off-by: SpagettiFisch <63868515+SpagettiFisch@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									bd5ff8b3fe
								
							
						
					
					
						commit
						b1b7b21aa2
					
				
					 2 changed files with 14 additions and 1 deletions
				
			
		
							
								
								
									
										15
									
								
								classes.py
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								classes.py
									
										
									
									
									
								
							|  | @ -223,7 +223,7 @@ class Stage(GameObjects): | |||
|             self.current += 1 | ||||
|         if self.current >= len(self.rooms): | ||||
|             return 1 | ||||
| 
 | ||||
|          | ||||
|     def draw(self, screen): | ||||
|         for room in self.rooms: | ||||
|             if room.id == self.current: | ||||
|  | @ -234,6 +234,8 @@ class Stage(GameObjects): | |||
|             if room.id == self.current: | ||||
|                 return room.getObjects() | ||||
| 
 | ||||
|     def placeRooms(self): | ||||
|          | ||||
| class Room(GameObjects): | ||||
|     def __init__(self, name:str, _type:str, bg, objects:list, WIDTH, HEIGHT, exits:list, id:int) -> None: | ||||
|         super().__init__(name, _type, bg, objects, WIDTH, HEIGHT) | ||||
|  | @ -287,3 +289,14 @@ class Obstacle(GameObjects): | |||
|         else: | ||||
|             pygame.draw.rect(screen, '#e7f8e0', self.rect, 2) | ||||
| 
 | ||||
| class Door(GameObjects): | ||||
|     def __init__(self, name: str, _type: str, bg, objects: list, WIDTH, HEIGHT, x: int, y: int, islocked=True) -> None: | ||||
|         super().__init__(name, _type, bg, objects, WIDTH, HEIGHT) | ||||
|         self.rect = pygame.Rect((x, y), self.background.get_size()) | ||||
|         self.locked = islocked | ||||
| 
 | ||||
|     def draw(self, screen): | ||||
|         screen.blit(self.background, self.rect) | ||||
|      | ||||
|     def update(self, islocked=True): | ||||
|         self.locked = islocked | ||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 SpagettiFisch
						SpagettiFisch