X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fobject%2Ffalling_coin.cpp;h=66b2c2ef07cb86a795a7c802c781abfb5af9f7d3;hb=f2ffe3ee4a4955232ac311c661f98e11d2daa155;hp=b1365b61cb5912b4aec3ca68e2936b3b403806e7;hpb=e50498b0a812cc8af84b0146ed917bb332471e8b;p=supertux.git diff --git a/src/object/falling_coin.cpp b/src/object/falling_coin.cpp index b1365b61c..66b2c2ef0 100644 --- a/src/object/falling_coin.cpp +++ b/src/object/falling_coin.cpp @@ -1,12 +1,10 @@ -// $Id: infoblock.cpp 3327 2006-04-13 15:02:40Z ravu_al_hemio $ -// // SuperTux // Copyright (C) 2006 Ondrej Hosek // -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,28 +12,26 @@ // GNU General Public License for more details. // // 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. +// along with this program. If not, see . -#include +#include "object/falling_coin.hpp" -#include "falling_coin.hpp" -#include "player.hpp" #include "sprite/sprite_manager.hpp" -#include "resources.hpp" -#include "main.hpp" +#include "supertux/globals.hpp" -FallingCoin::FallingCoin(const Vector& start_position, const int vel_x) +FallingCoin::FallingCoin(const Vector& start_position, const int vel_x) : + physic(), + pos(), + sprite() { pos = start_position; sprite = sprite_manager->create("images/objects/coin/coin.sprite"); - physic.set_velocity_y(800); + physic.set_velocity_y(-800); physic.set_velocity_x(vel_x); } FallingCoin::~FallingCoin() { - delete sprite; } void @@ -51,3 +47,5 @@ FallingCoin::update(float elapsed_time) if (pos.y > SCREEN_HEIGHT) remove_me(); } + +/* EOF */