00001 // SuperTux 00002 // Copyright (C) 2006 Matthias Braun <matze@braunis.de> 00003 // Copyright (C) 2010 Florian Forster <supertux at octo.it> 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_BADGUY_HAYWIRE_HPP 00019 #define HEADER_SUPERTUX_BADGUY_HAYWIRE_HPP 00020 00021 #include "badguy/walking_badguy.hpp" 00022 00023 class Haywire : public WalkingBadguy 00024 { 00025 public: 00026 Haywire(const Reader& reader); 00027 Haywire(const Vector& pos, Direction d); 00028 00029 void kill_fall(); 00030 HitResponse collision(GameObject& object, const CollisionHit& hit); 00031 HitResponse collision_player(Player& player, const CollisionHit& hit); 00032 00033 void active_update(float elapsed_time); 00034 00035 void freeze(); 00036 bool is_freezable() const; 00037 00038 protected: 00039 bool collision_squished(GameObject& object); 00040 00041 private: 00042 bool is_exploding; 00043 float time_until_explosion; 00044 bool is_stunned; 00045 float time_stunned; 00046 }; 00047 00048 #endif /* HEADER_SUPERTUX_BADGUY_HAYWIRE_HPP */ 00049 00050 /* EOF */