Platz Function PlatzMove
Jump to navigation
Jump to search
Prototype |
|
---|---|
Description |
Moves the actor through the level, taking collisions into account. Moving platforms must be updated within this function, so it should be called each frame regardless of the actor's status. |
Parameters |
|
Returns |
Collision flag.
|
Video Modes |
3 |
Since |
V0.3a |
Example:
char xVel, yVel; // Holds result of your custom player movement/physics code platzActor a; // ... if (xVel != a.vx.vel) PlatzSetVelocity(&a.vx,xVel,&a.trLoc.x); if (yVel != a.vy.vel) PlatzSetVelocity(&a.vy,yVel,&a.trLoc.y); collFlag = PlatzMove(&a); /* * React to collFlag here (maybe animate or end jump sequence etc) */ MoveSprite(MY_SPRITE,a.sprx-a.bbx,a.loc.y-a.bby+1,MY_SPRITE_WID,MY_SPRITE_HGT); PlatzTick();