Advertisement
fedexist

Untitled

Nov 3rd, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local pos_y = current_actual_position.y + delta.y
  2. local pos_x = current_actual_position.x - delta.x
  3.        
  4. local alfa = tileheight/tilewidth --coefficiente angolare del fascio di rette parallele
  5.  
  6. --parametri dei fasci di rette che identificano la casella dei dati della mappa in cui si trova il giocatore
  7.        
  8. local j = (2/tileheight)*(pos_y + tileheight/2 - alfa*pos_x) --column
  9. local k = (2/tileheight)*(pos_y - tileheight/2 + alfa*pos_x) --row
  10.        
  11. print(k, j) --test
  12.  
  13. --border settings for isometric tiles
  14. if current_location.data[k][j] ~=0 then
  15.     delta = vector(0,0)
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement