diff options
author | Luke Bratch <l_bratch@yahoo.co.uk> | 2010-11-27 23:30:54 +0000 |
---|---|---|
committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2010-11-27 23:30:54 +0000 |
commit | 15b4a73ea44dc8603989197ae50cc902ec9e39d6 (patch) | |
tree | a08c0eba688ff46e8dba8fdd8c6c6d6bfbe7a7af | |
parent | 34de0b2b50c3ab4dbb917ddcfda89d1eb12bc6be (diff) |
Level: Implement death
-rw-r--r-- | Level.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -92,6 +92,14 @@ void Level::move() { player.setY(rect.y); + // Kill the player if they fall off the screen + if (player.getY() > SCREEN_HEIGHT) { + player.kill(); + player.setX(startX); + player.setY(startY); + cameraX = 0; + } + player.orient(); } |