| 486 | } |
| 487 | |
| 488 | void Player::Hit() |
| 489 | { |
| 490 | sound.PlaySfx(SOUND_HURT); |
| 491 | hit = 120; |
| 492 | health--; |
| 493 | score--; |
| 494 | if (health < 2 && !crouching) |
| 495 | topPadding += (size.y / 2 - bottomPadding); |
| 496 | else if (!crouching) |
| 497 | topPadding = storeTopPadding; |
| 498 | } |
| 499 | |
| 500 | void Player::update(WorldRect* pconstraints, TileMap* pcollisionmap, |
| 501 | TileMap* pfrontmap, std::vector<TileMap>* pdcollisionmaps, |