Exemple #1
0
         # laser.living = True
         # lasers += [laser]
         
 for block in map.killblocks:
     block.deathplayerCollide(player, healthbar)        
 if sword.living:
     sword.slash(player)
 if godmode == True:
     healthbar.frame = 0
     
 hurt.place2(player)
 # Stuff that objects do
 player.move()
 player.wallCollide()
 healthbar.check(player)
 healthbar.animate2(player)
 player.update(healthbar)
 for block in map.blocks:
     block.playerCollide(player)
 for block in map.mblocks:
     if block.playerCollide(player):
         if ((block.dir == "N" and (player.dir == "up" or player.dir == "stop up"))
             or (block.dir == "S" and (player.dir == "down" or player.dir == "stop down"))
             or (block.dir == "E" and (player.dir == "right" or player.dir == "stop right"))
             or (block.dir == "W" and (player.dir == "left" or player.dir == "stop left"))
             or (block.dir == "1" and (player.dir == "up" or player.dir == "stop up"))
             or (block.dir == "2" and (player.dir == "down" or player.dir == "stop down"))
             or (block.dir == "3" and (player.dir == "up" or player.dir == "stop up"))
             or (block.dir == "4" and (player.dir == "down" or player.dir == "stop down"))
             or (block.dir == "6" and (player.dir == "up" or player.dir == "stop up"))):
             map.load(block.newMap)