HandleSprite.htm 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>HandleSprite sprite,x_handle#,y_handle#</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. sprite - sprite handle. Not to be confused with HandleSprite - ie. the handle used to position the sprite, rather than the sprite's actual handle
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. Sets a sprite handle. Defaults to 0,0. <br />
  21. <br />
  22. A sprite extends from -1,-1 to +1,+1.
  23. <br>
  24. <br>
  25. See also: <a class=small href=LoadSprite.htm>LoadSprite</a>, <a class=small href=CreateSprite.htm>CreateSprite</a>.
  26. </td>
  27. </tr>
  28. </table>
  29. <h1><a href=../3d_examples/HandleSprite.bb>Example</a></h1>
  30. <table>
  31. <tr>
  32. <td>
  33. Graphics3D 640,480 <br />
  34. <br />
  35. cam = CreateCamera() <br />
  36. MoveEntity cam,0,0,-5 <br />
  37. <br />
  38. sp = CreateSprite() <br />
  39. <br />
  40. handlepos# = 0.0 <br />
  41. While Not KeyDown(1) <br />
  42. RenderWorld <br />
  43. Color 100,100,100 <br />
  44. Plot 320,240 <br />
  45. Text 320,250,"Handle",True <br />
  46. Flip <br />
  47. HandleSprite sp,handlepos,handlepos <br />
  48. handlepos = handlepos + 0.01 <br />
  49. Wend <br />
  50. End
  51. </td>
  52. </tr>
  53. </table>
  54. <br>
  55. <a target=_top href=../index.htm>Index</a><br>
  56. <br>
  57. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=HandleSprite&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  58. </html>