def main(): pysage.initialize() pysage.enableCollision(TYPE_SHAPE, TYPE_FLOOR) pysage.enableCollision(TYPE_SHAPE, TYPE_BLOCK) floor = pysage.GameObject(0, 480, 640, 16) pysage.addObject(floor, TYPE_FLOOR) lockedblocks.append(floor) pysage.listenForControllerInput(spawnShape) pysage.runThread(callCounter) pysage.start() pysage.cleanup()
def lockPosition(self): for i in self.blocks: lockedblocks.append(i) pysage.removeObject(i) pysage.addObject(i, TYPE_BLOCK)
def add(self): for i in self.blocks: pysage.addObject(i, TYPE_SHAPE) pysage.listenForCollisionOnObject(self.handleCollision, i) pysage.runThread(self.update)
def add(self): pysage.addObject(self, TYPE_PADDLE); pysage.runThread(self.think) pysage.runThread(self.update)
def add(self): pysage.addObject(self, TYPE_BALL); pysage.runThread(self.update)