home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-Update.iso / Rhapsody / developer / examples / LocalizationExample.5.0.m.I.bs.tz / LocalizationExample.5.0.m.I.bs / LocalizationExample.5.0.I.bs / Source / FlyingWindow.h < prev    next >
Encoding:
Text File  |  1997-11-03  |  737 b   |  34 lines

  1.  
  2. // Copyright (c) 1997 by Don Yacktman
  3. // All rights reserved.
  4. // Permission to use this code in your application, whether
  5. // commercial, shareware, or freeware, is granted.
  6. // This notice may not be removed or altered.
  7.  
  8.  
  9. #import <AppKit/AppKit.h>
  10.  
  11. // odd number; this number divided by 2 is how far a window
  12. // could move horizontally in one frame's worth of animation.
  13. #define HORIZ_JUMPS    27
  14.  
  15. // max initial vertical velocity is this + MIN_VERT
  16. #define VERT_JUMPS    10
  17.  
  18. // minimum initial vertical velocity.
  19. #define MIN_VERT    5
  20.  
  21. // amount gravity reduces y-velocity
  22. #define GRAVITY        1.0
  23.  
  24. @interface FlyingWindow:NSWindow
  25. {
  26.     NSPoint velocity;
  27. }
  28.  
  29. - initAt:(NSPoint *)thePoint;
  30. - reInitAt:(NSPoint *)thePoint;
  31. - move;
  32. - (BOOL)onScreen;
  33.  
  34. @end