39 |
/** |
/** |
40 |
* Initialize a new object mobile, with a given name, position, |
* Initialize a new object mobile, with a given name, position, |
41 |
* velocity, angularVelocity, acceleration, direction. |
* velocity, angularVelocity, acceleration, direction. |
42 |
|
* The HgPlayer's pointer is necessary to know the player who owes this object. |
43 |
|
* If nobody owes this object, the pointer is nil. |
44 |
*/ |
*/ |
45 |
- (id) initWithGame: (HgGame *)game |
- (id) initWithGame: (HgGame *)game |
46 |
|
player: (HgPlayer *)player |
47 |
position: (coord_t)position |
position: (coord_t)position |
48 |
velocity: (coord_t)velocity |
velocity: (coord_t)velocity |
49 |
angularVelocity: (coord_t)angularVelocity |
angularVelocity: (coord_t)angularVelocity |
51 |
direction: (float)direction |
direction: (float)direction |
52 |
{ |
{ |
53 |
NSParameterAssert (game); |
NSParameterAssert (game); |
54 |
|
|
55 |
/* FIXME - check velocity, ... */ |
/* FIXME - check velocity, ... */ |
56 |
|
|
57 |
[super initWithGame: game |
[super initWithGame: game |
58 |
|
withPlayer: player |
59 |
position : position]; |
position : position]; |
60 |
if (self != nil) |
if (self != nil) |
61 |
{ |
{ |