// $Id$
//
-// SuperTux - A Jump'n Run
-// Copyright (C) 2003 Tobias Glaesser <tobi.web@gmx.de>
+// SuperTux
+// 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
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
#ifndef SUPERTUX_PLAYER_H
#define SUPERTUX_PLAYER_H
extern TuxBodyParts* fire_tux;
extern TuxBodyParts* ice_tux;
-class FallingCoin : public GameObject
-{
-public:
- FallingCoin(const Vector& start_position, const int x_vel);
- ~FallingCoin();
-
- void draw(DrawingContext& context);
- void update(float elapsed_time);
-private:
- Vector pos;
- Sprite* sprite;
- Physic physic;
-};
-
class Player : public MovingObject, public Scripting::Player, public ScriptInterface
{
public:
void kill(HurtMode mode);
void check_bounds(Camera* camera);
void move(const Vector& vector);
- void set_bonus(BonusType type, bool animate = false);
+
+ virtual void add_bonus(const std::string& bonus);
+ virtual void add_coins(int count);
+ void add_bonus(BonusType type, bool animate = false); /**< picks up a bonus, taking care not to pick up lesser bonus items than we already have */
+ void set_bonus(BonusType type, bool animate = false); /**< like add_bonus, but can also downgrade the bonus items carried */
PlayerStatus* get_status()
{
return player_status;