src/trigger/climbable.hpp

Go to the documentation of this file.
00001 //  SuperTux - Climbable area
00002 //  Copyright (C) 2007 Christoph Sommer <christoph.sommer@2007.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_TRIGGER_CLIMBABLE_HPP
00018 #define HEADER_SUPERTUX_TRIGGER_CLIMBABLE_HPP
00019 
00020 #include "supertux/resources.hpp"
00021 #include "supertux/timer.hpp"
00022 #include "trigger/trigger_base.hpp"
00023 #include "util/reader_fwd.hpp"
00024 #include "video/drawing_context.hpp"
00025 
00026 class Player;
00027 
00028 class Climbable : public TriggerBase
00029 {
00030   static Color text_color;
00031 public:
00032   Climbable(const Reader& reader);
00033   Climbable(const Rectf& area);
00034   ~Climbable();
00035 
00036   void event(Player& player, EventType type);
00037   void update(float elapsed_time);
00038   void draw(DrawingContext& context);
00039 
00043   bool may_climb(Player& player);
00044 
00045 protected:
00046   Player* climbed_by; 
00047   Timer activate_try_timer; 
00049 private:
00050   Climbable(const Climbable&);
00051   Climbable& operator=(const Climbable&);
00052 };
00053 
00054 #endif
00055 
00056 /* EOF */

Generated on Mon Jun 9 03:38:23 2014 for SuperTux by  doxygen 1.5.1