home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming for Teens (2nd Edition) / 3DGPFT2E.iso / Source / Chapter13 / demo13-05.bb < prev    next >
Text File  |  2009-01-20  |  1KB  |  53 lines

  1. ; demo13-05.bb - Bomb
  2. ; --------------------
  3.  
  4. Graphics3D 640,480
  5. SetBuffer BackBuffer()
  6.  
  7. Const ESC_KEY = 1
  8.  
  9. ; Create camera
  10. camera=CreateCamera()
  11.  
  12. ; Creating a light
  13.  
  14. light=CreateLight()
  15.  
  16. ; This is the code for creating the cone
  17.  
  18. bomb=CreateSphere()
  19. PositionEntity bomb,0,0,5
  20. EntityColor bomb, 230,34,75
  21. EntityOrder bomb, -1
  22.  
  23.  
  24. ; This is the code for creating the shrapnel
  25.  
  26. shrapnel=CreateSphere()
  27. PositionEntity shrapnel,0,0,5
  28. ScaleEntity shrapnel, 0.1,0.1,0.1
  29. EntityColor shrapnel, 230,34,75
  30.  
  31. shrapnel1=CreateSphere()
  32. PositionEntity shrapnel1,0,0,5
  33. ScaleEntity shrapnel1, 0.1,0.1,0.1
  34. EntityColor shrapnel1, 230,34,75
  35.  
  36. shrapnel2=CreateSphere()
  37. PositionEntity shrapnel2,0,0,5
  38. ScaleEntity shrapnel2, 0.1,0.1,0.1
  39. EntityColor shrapnel2, 230,34,75
  40.  
  41. shrapnel3=CreateSphere()
  42. PositionEntity shrapnel3,0,0,5
  43. ScaleEntity shrapnel3, 0.1,0.1,0.1
  44. EntityColor shrapnel3, 230,34,75
  45.  
  46. ; This code makes the program run
  47.  
  48. While Not KeyDown( ESC_KEY )
  49.  
  50. RenderWorld
  51. Flip
  52. Wend
  53.