Пример #1
0
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()
Пример #2
0
 def add(self):
     for i in self.blocks:
         pysage.addObject(i, TYPE_SHAPE)
         pysage.listenForCollisionOnObject(self.handleCollision, i)
     pysage.runThread(self.update)
Пример #3
0
 def add(self):
     pysage.addObject(self, TYPE_PADDLE);
     pysage.runThread(self.think) 
     pysage.runThread(self.update)
Пример #4
0
 def add(self):
     pysage.addObject(self, TYPE_BALL);
     pysage.runThread(self.update)