Last change
on this file since 2080 was
2036,
checked in by patrick, 21 years ago
|
orxonxo/trunk/src: extended framework: class inheritance, right including (had som bugs), framework not finished yet
|
File size:
940 bytes
|
Rev | Line | |
---|
[1920] | 1 | |
---|
| 2 | #ifndef SHOOT_ROCKET_H |
---|
| 3 | #define SHOOT_ROCKET_H |
---|
| 4 | |
---|
| 5 | |
---|
| 6 | |
---|
[1926] | 7 | enum RocketType { HOMING, SIDEACC, BACKPARABLE, ROTATER}; |
---|
[1924] | 8 | enum RocketDirection {LEFT, RIGHT, UP, DOWN}; |
---|
| 9 | |
---|
[2036] | 10 | |
---|
[1920] | 11 | class ShootRocket { |
---|
| 12 | |
---|
| 13 | public: |
---|
| 14 | |
---|
| 15 | /* a list of all shoot-amental objects */ |
---|
| 16 | struct shoot { |
---|
[1924] | 17 | enum RocketType type; |
---|
[1920] | 18 | shoot *next; |
---|
| 19 | float xCor; |
---|
| 20 | float yCor; |
---|
| 21 | float zCor; |
---|
| 22 | float xVel; |
---|
| 23 | float yVel; |
---|
| 24 | float zVel; |
---|
| 25 | float xAcc; |
---|
| 26 | float yAcc; |
---|
| 27 | float zAcc; |
---|
| 28 | float age; |
---|
[1957] | 29 | float lifetime; |
---|
[1920] | 30 | float collisionRadius; |
---|
| 31 | }; |
---|
| 32 | shoot* lastShoot; |
---|
[1926] | 33 | |
---|
[1920] | 34 | ShootRocket (); |
---|
| 35 | ~ShootRocket (); |
---|
[1921] | 36 | |
---|
| 37 | int inhibitor; |
---|
[1926] | 38 | float rotateAngle; |
---|
[1920] | 39 | |
---|
| 40 | void drawShoot(void); |
---|
| 41 | void addShoot(shoot* sh); |
---|
[1924] | 42 | void addBackParable(float x, float y, float z); |
---|
| 43 | void addSideAcc(float x, float y, float z, enum RocketDirection direction); |
---|
[1926] | 44 | void addRotater(float x, float y, float z); |
---|
| 45 | |
---|
[1920] | 46 | void setShootStep(float step); |
---|
| 47 | void removeShoot(shoot* sh); |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | private: |
---|
| 51 | |
---|
| 52 | float step; |
---|
| 53 | |
---|
| 54 | }; |
---|
| 55 | |
---|
| 56 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.