def step(self, settings): Framework.step(self, settings) r = random.random() px =(random.random() - 0.5)*10.0 py =(random.random() - 0.5)*2.0 if self.step_count < 1500: pd = b2d.particle_def(group=self.group, position=(px, py))#, velocity=(vx,vy)) self.psystem.create_particle(pd)
def step(self, settings): Framework.step(self, settings) #print(self.count) self.count -= 1 if self.count <= 0: return self.world.create_dynamic_body( position=(0, 10), allow_sleep=False, fixtures=fixture_def( density=1.0, shape=polygon_shape(box=(0.125, 0.125))), )