16 lines
374 B
Python
16 lines
374 B
Python
import pygame
|
|
|
|
class BaseScene:
|
|
def __init__(self, screen: pygame.Surface, clock: pygame.time.Clock):
|
|
self.screen = screen
|
|
self.clock = clock
|
|
self.next_scene = None
|
|
|
|
def update(self):
|
|
pass
|
|
|
|
def handle_event(self, events):
|
|
pass
|
|
|
|
def switch_to_scene(self, scene_class):
|
|
self.next_scene = scene_class(self.screen) |