src/object/thunderstorm.hpp

Go to the documentation of this file.
00001 //  SuperTux - Thunderstorm Game Object
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_OBJECT_THUNDERSTORM_HPP
00018 #define HEADER_SUPERTUX_OBJECT_THUNDERSTORM_HPP
00019 
00020 #include "util/reader_fwd.hpp"
00021 #include "scripting/thunderstorm.hpp"
00022 #include "supertux/game_object.hpp"
00023 #include "supertux/script_interface.hpp"
00024 #include "supertux/timer.hpp"
00025 #include "video/drawing_context.hpp"
00026 
00030 class Thunderstorm : public GameObject, 
00031                      public ScriptInterface
00032 {
00033 public:
00034   Thunderstorm(const Reader& reader);
00035 
00036   void update(float elapsed_time);
00037   void draw(DrawingContext& context);
00038 
00039   virtual void expose(HSQUIRRELVM vm, SQInteger table_idx);
00040   virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx);
00041 
00050   void start();
00051 
00055   void stop();
00056 
00060   void thunder();
00061 
00065   void lightning();
00066 
00070   void flash();
00071 
00075   void electrify();
00076 
00081 private:
00082   bool running; 
00083   float interval; 
00084   int layer; 
00086   Timer time_to_thunder; 
00087   Timer time_to_lightning; 
00088   Timer flash_display_timer; 
00089 };
00090 
00091 #endif
00092 
00093 /* EOF */

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