All pastes #381913 Raw Edit

Someone

public text v1 · immutable
·published 2007-03-05 03:52 UTC
rendered paste body
        world=self.mapa_iso
##        TILE_ANCHO=world.tile_size
##        TILE_ALTO=world.tile_size/2
        TILE_ANCHO=60
        TILE_ALTO=30
        if e.type == pygame.MOUSEBUTTONDOWN and e.button == 1:
            self.a = e.pos
        elif e.type == pygame.MOUSEBUTTONDOWN and e.button == 3:
            mx,my = pygame.mouse.get_pos()
            mx += world.globex
            my += world.globey
            x0 = mx - (TILE_ANCHO/2)
            y0 = my
            x = y0 + (x0 / 2)
            y = y0 - (x0 / 2)
            x /= TILE_ALTO
            y /= TILE_ALTO
            x -= 4
            y += 5
            print 'TILE POS', x,y