00001 // SuperTux 00002 // Copyright (C) 2006 Matthias Braun <matze@braunis.de> 00003 // Copyright (C) 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.de> 00004 // 00005 // This program is free software: you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation, either version 3 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 00018 #ifndef HEADER_SUPERTUX_OBJECT_SPRITE_PARTICLE_HPP 00019 #define HEADER_SUPERTUX_OBJECT_SPRITE_PARTICLE_HPP 00020 00021 #include "object/anchor_point.hpp" 00022 #include "sprite/sprite.hpp" 00023 #include "sprite/sprite_manager.hpp" 00024 00025 class Player; 00026 00027 class SpriteParticle : public GameObject 00028 { 00029 public: 00030 SpriteParticle(std::string sprite_name, std::string action, Vector position, AnchorPoint anchor, Vector velocity, Vector acceleration, int drawing_layer = LAYER_OBJECTS-1); 00031 ~SpriteParticle(); 00032 protected: 00033 virtual void hit(Player& player); 00034 virtual void update(float elapsed_time); 00035 virtual void draw(DrawingContext& context); 00036 00037 private: 00038 SpritePtr sprite; 00039 Vector position; 00040 Vector velocity; 00041 Vector acceleration; 00042 int drawing_layer; 00043 00044 private: 00045 SpriteParticle(const SpriteParticle&); 00046 SpriteParticle& operator=(const SpriteParticle&); 00047 }; 00048 00049 #endif 00050 00051 /* EOF */