home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming for Teens (2nd Edition) / 3DGPFT2E.iso / Source / Chapter03 / demo03-05.bb < prev    next >
Encoding:
Text File  |  2009-01-21  |  410 b   |  20 lines

  1. ;demo03-05.bb  - Closes program after player presses ESC.
  2. Graphics 640,480
  3. Text 0,0, "Why did you open this program?"
  4. Flip
  5. ;y is the variable that judges the location of the text
  6. y=12
  7. Repeat 
  8.     ;Print text
  9.     Text 0,y, "Press Esc to exit."
  10.     ;wait a sec
  11.     Delay 1000 
  12.     Flip
  13.     
  14.     ;Move next line of text down
  15.     y=y+12
  16.     
  17. ;repeat until user hits esc
  18. Until KeyHit(1) 
  19. Text 0,y, "Program is ending."
  20. Flip