Guest User

Untitled

a guest
Oct 16th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. Original:
  2. function corridorsprite(flip, shader, minfr)
  3. local xpos;
  4. if flip == 0 then
  5. xpos = 0;
  6. else
  7. xpos = 500;
  8. end
  9. local w = 650;
  10. return game:addSprite{ shader = shader, alpha = 1, alphaVelocity = 0, scenePath = "Game/3DSpace",
  11. position = {240, 0, 0},
  12. vertices = {{w,xpos,-10000},
  13. {w,xpos,4250},
  14. {-w + 170,xpos,-10000},
  15. {-w + 170,xpos,4250}},
  16. rotation = {0, 0, 45},
  17. minimumFrameRate = minfr,
  18. alpha = 0.01,
  19. animator = {
  20. duration = 0.01,
  21. type = "float",
  22. animatedProperty = "alpha",
  23. startValue = 0.01,
  24. targetValue = 0
  25. }
  26. };
  27. end
  28.  
  29. My Modification:
  30. -----------------------------------
  31. function corridorspriteLand(flip, shader, minfr)
  32. local xpos;
  33. if flip == 0 then
  34. xpos = 0;
  35. else
  36. xpos = 500;
  37. end
  38. local w = 650;
  39. return game:addSprite{ shader = shader, alpha = 1, alphaVelocity = 0, scenePath = "Game/3DSpace",
  40. position = {160, 0, 0},
  41. --[[ vertices = {{w,xpos,-10000},
  42. {w,xpos,4250},
  43. {-w + 170,xpos,-10000},
  44. {-w + 170,xpos,4250}},--]]
  45. vertices = {{xpos,w,-10000},
  46. {xpos,w,4250},
  47. {xpos,-w + 170,-10000},
  48. {xpos,-w + 170,4250}},
  49. rotation = {0, 0, 45},
  50. minimumFrameRate = minfr,
  51. alpha = 0.01,
  52. animator = {
  53. duration = 0.01,
  54. type = "float",
  55. animatedProperty = "alpha",
  56. startValue = 0.01,
  57. targetValue = 0
  58. }
  59. };
  60. end
Add Comment
Please, Sign In to add comment