Exemple #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()
Exemple #2
0
 def lockPosition(self):
     for i in self.blocks:
         lockedblocks.append(i)
         pysage.removeObject(i)
         pysage.addObject(i, TYPE_BLOCK)
Exemple #3
0
 def add(self):
     for i in self.blocks:
         pysage.addObject(i, TYPE_SHAPE)
         pysage.listenForCollisionOnObject(self.handleCollision, i)
     pysage.runThread(self.update)
Exemple #4
0
 def add(self):
     pysage.addObject(self, TYPE_PADDLE);
     pysage.runThread(self.think) 
     pysage.runThread(self.update)
Exemple #5
0
 def add(self):
     pysage.addObject(self, TYPE_BALL);
     pysage.runThread(self.update)