# MOVE UP if (keys[K_UP]) and PLAYER.PLAYER_POS[1] > 0: key_events.key_up() # MOVE DOWN if (keys[K_DOWN]) and PLAYER.PLAYER_POS[1] < MAPHEIGHT - 1: key_events.key_down() # PLACING DOWN ITEMS if (keys[K_SPACE]): key_events.key_space() # FIRE ORB FROM WAND if (keys[K_f]): if PLAYER.WEAPON == WAND: orbs_list.append(heroes.ORB(math.ceil(PLAYER.PLAYER_POS[0]), math.ceil(PLAYER.PLAYER_POS[1]), PLAYER.DIRECTION)) """ TIMED EVENTS """ # GAnon & \portal movement if (event.type == USEREVENT): if PORTAL.FRAME < 5: PORTAL.FRAME += 1 else: x = random.randint(1, 9) y = random.randint(1, 9) PORTAL.POS = [x, y] GANON.GANON_POS = [x, y] PORTAL.FRAME = 1
key_events.key_up() # MOVE DOWN if (keys[K_DOWN]) and PLAYER.PLAYER_POS[1] < MAPHEIGHT - 1: key_events.key_down() # PLACING DOWN ITEMS if (keys[K_SPACE]): key_events.key_space() # FIRE ORB FROM WAND if (keys[K_f]): if PLAYER.WEAPON == WAND: orbs_list.append( heroes.ORB(math.ceil(PLAYER.PLAYER_POS[0]), math.ceil(PLAYER.PLAYER_POS[1]), PLAYER.DIRECTION)) """ TIMED EVENTS """ # GANON W/PORTAL MOVEMENT if (event.type == USEREVENT): if PORTAL.FRAME < 5: PORTAL.FRAME += 1 else: x = random.randint(1, 9) y = random.randint(1, 9) PORTAL.POS = [x, y] GANON.GANON_POS = [x, y] PORTAL.FRAME = 1