1 //  SuperTux
2 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
3 //
4 //  This program is free software: you can redistribute it and/or modify
5 //  it under the terms of the GNU General Public License as published by
6 //  the Free Software Foundation, either version 3 of the License, or
7 //  (at your option) any later version.
8 //
9 //  This program is distributed in the hope that it will be useful,
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 //  GNU General Public License for more details.
13 //
14 //  You should have received a copy of the GNU General Public License
15 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 
17 #include "math/easing.hpp"
18 #include "object/rain_particle_system.hpp"
19 #include "scripting/rain.hpp"
20 
21 namespace scripting {
22 
set_enabled(bool enable)23 void Rain::set_enabled(bool enable)
24 {
25   SCRIPT_GUARD_VOID;
26   object.set_enabled(enable);
27 }
28 
get_enabled() const29 bool Rain::get_enabled() const
30 {
31   SCRIPT_GUARD_DEFAULT;
32   return object.get_enabled();
33 }
34 
fade_speed(float speed,float time)35 void Rain::fade_speed(float speed, float time)
36 {
37   SCRIPT_GUARD_VOID;
38   object.fade_speed(speed, time);
39 }
40 
fade_amount(float amount,float time)41 void Rain::fade_amount(float amount, float time)
42 {
43   SCRIPT_GUARD_VOID;
44   object.fade_amount(amount, time);
45 }
46 
fade_angle(float angle,float time,const std::string & ease)47 void Rain::fade_angle(float angle, float time, const std::string& ease)
48 {
49   SCRIPT_GUARD_VOID;
50   object.fade_angle(angle, time, getEasingByName(EasingMode_from_string(ease)));
51 }
52 
53 } // namespace scripting
54 
55 /* EOF */
56