def start_scene(self, scene, kwargs):
     if isinstance(scene, type):
         scene = scene(**(kwargs or {}))
     self.scenes.append(scene)
     self.signal(events.SceneStarted())
Beispiel #2
0
 def _start_scene(self, scene, kwargs):
     """Start a scene."""
     if isinstance(scene, type):
         scene = scene(**(kwargs or {}))
     self.children.push_scene(scene)
     self.signal(events.SceneStarted())
Beispiel #3
0
 def start_scene(self, scene, kwargs):
     if kwargs:
         scene = scene(self, **kwargs)
     self.scenes.append(scene)
     self.signal(events.SceneStarted())
def test_collider_on_scene_started(scene: BaseScene, basic_collider: Collider,
                                   expected):

    basic_collider.on_scene_started(events.SceneStarted(scene), lambda x: None)

    assert basic_collider.running == expected