// $Id$
//
-// SuperTux - A Jump'n Run
+// SuperTux
// Copyright (C) 2003 Tobias Glaesser <tobi.web@gmx.de>
+// Copyright (C) 2006 Matthias Braun <matze@braunis.de>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
}
void
-PlayerStatus::incLives()
+PlayerStatus::add_coins(int count)
{
- player_status->coins = std::min(player_status->coins+100, MAX_COINS);
- sound_manager->play("sounds/lifeup.wav");
-}
-
-void
-PlayerStatus::incCoins()
-{
- coins++;
- sound_manager->play("sounds/coin.wav");
+ coins = std::min(coins + count, MAX_COINS);
+ if(count > 100)
+ sound_manager->play("sounds/lifeup.wav");
+ else
+ sound_manager->play("sounds/coin.wav");
}
void