17 #ifndef HEADER_SUPERTUX_OBJECT_CLOUD_PARTICLE_SYSTEM_HPP 18 #define HEADER_SUPERTUX_OBJECT_CLOUD_PARTICLE_SYSTEM_HPP 20 #include "object/particlesystem.hpp" 22 #include "video/surface_ptr.hpp" 35 static void register_class(ssq::VM& vm);
43 virtual void update(
float dt_sec)
override;
47 static std::string class_name() {
return "particles-clouds"; }
48 virtual std::string get_class_name()
const override {
return class_name(); }
49 virtual std::string get_exposed_class_name()
const override {
return "CloudParticleSystem"; }
50 static std::string display_name() {
return _(
"Cloud Particles"); }
55 virtual const std::string get_icon_path()
const override {
56 return "images/engine/editor/clouds.png";
73 void fade_amount(
int amount,
float time,
float time_between);
83 static int constexpr
const max_amount = 500;
84 static int constexpr
const min_amount = 0;
88 int add_clouds(
int amount,
float fade_time);
91 int remove_clouds(
int amount,
float fade_time);
94 class CloudParticle :
public Particle 99 float target_time_remaining;
104 target_time_remaining()
108 SurfacePtr cloudimage;
110 float m_current_speed;
111 float m_target_speed;
112 float m_speed_fade_time_remaining;
114 int m_current_amount;
115 int m_current_real_amount;
void fade_amount(int amount, float time, float time_between)
Smoothly changes the amount of particles to the given value in ""time"" seconds.
Definition: cloud_particle_system.cpp:213
void set_amount(int amount, float time)
Smoothly changes the amount of particles to the given value in ""time"" seconds.
Definition: cloud_particle_system.cpp:230
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: cloud_particle_system.cpp:236
void fade_speed(float speed, float time)
Smoothly changes the rain speed to the given value in ""time"" seconds.
Definition: cloud_particle_system.cpp:199
Definition: particlesystem.hpp:86
Definition: object_settings.hpp:39
This is the base class for particle systems.
Definition: particlesystem.hpp:49
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: cloud_particle_system.hpp:52
A ""CloudParticleSystem"" that was given a name can be controlled by scripts.
Definition: cloud_particle_system.hpp:32
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: cloud_particle_system.cpp:82
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: particlesystem.hpp:66
A helper structure to list all the type_indexes of the classes in the type hierarchy of a given class...
Definition: game_object.hpp:57
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: cloud_particle_system.hpp:51
Definition: reader_mapping.hpp:32
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42