00001 // MoleRock - Rock thrown by "Mole" Badguy 00002 // Copyright (C) 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.de> 00003 // 00004 // This program is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 00017 #ifndef HEADER_SUPERTUX_BADGUY_MOLE_ROCK_HPP 00018 #define HEADER_SUPERTUX_BADGUY_MOLE_ROCK_HPP 00019 00020 #include "badguy/badguy.hpp" 00021 00025 class MoleRock : public BadGuy 00026 { 00027 public: 00028 MoleRock(const Reader& reader); 00029 MoleRock(const Vector& pos, const Vector& velocity, const BadGuy* parent); 00030 ~MoleRock(); 00031 00032 void initialize(); 00033 void deactivate(); 00034 00035 void active_update(float elapsed_time); 00036 00037 void collision_solid(const CollisionHit& hit); 00038 HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); 00039 HitResponse collision_player(Player& player, const CollisionHit& hit); 00040 00041 virtual bool updatePointers(const GameObject* from_object, GameObject* to_object); 00042 00043 protected: 00044 const BadGuy* parent; 00045 const Vector initial_velocity; 00047 private: 00048 MoleRock(const MoleRock&); 00049 MoleRock& operator=(const MoleRock&); 00050 }; 00051 00052 #endif 00053 00054 /* EOF */