Advertisement
lavalevel

Fix for rotating screen

Nov 11th, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.02 KB | None | 0 0
  1. -- snapshot:rotate(_currentAngle) didn't work, so.....
  2.  
  3.         if _directionNumber == 1 then
  4.             if _previousDirection == 2 then
  5.             snapshot:rotate(-90)
  6.             end
  7.             if _previousDirection == 3 then
  8.             snapshot:rotate(180)
  9.             end
  10.             if _previousDirection == 4 then
  11.             snapshot:rotate(90)
  12.             end
  13.         end
  14.  
  15.         if _directionNumber == 2 then
  16.             if _previousDirection ==1 then
  17.             snapshot:rotate( 90 )
  18.             elseif _previousDirection ==4 then
  19.             snapshot:rotate( -180 )
  20.             elseif _previousDirection ==3 then
  21.             snapshot:rotate( -90 )
  22.             end
  23.         end
  24.  
  25.         if _directionNumber == 3 then
  26.             if _previousDirection == 2 then
  27.             snapshot:rotate(90)
  28.             end
  29.             if _previousDirection == 4 then
  30.             snapshot:rotate(-90)
  31.             end
  32.             if _previousDirection == 1 then
  33.             snapshot:rotate(180)
  34.             end
  35.         end
  36.  
  37.         if _directionNumber == 4 then
  38.             if _previousDirection == 3 then
  39.             snapshot:rotate(90)
  40.             end
  41.             if _previousDirection == 1 then
  42.             snapshot:rotate(-90)
  43.             end
  44.             if _previousDirection == 2 then
  45.             snapshot:rotate(180)
  46.             end
  47.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement