ported particle sub-emission to 2D
This commit is contained in:
@ -79,6 +79,8 @@ private:
|
||||
|
||||
RID mesh;
|
||||
|
||||
void _attach_sub_emitter();
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
virtual void _validate_property(PropertyInfo &property) const override;
|
||||
@ -139,6 +141,19 @@ public:
|
||||
|
||||
TypedArray<String> get_configuration_warnings() const override;
|
||||
|
||||
void set_sub_emitter(const NodePath &p_path);
|
||||
NodePath get_sub_emitter() const;
|
||||
|
||||
enum EmitFlags {
|
||||
EMIT_FLAG_POSITION = RS::PARTICLES_EMIT_FLAG_POSITION,
|
||||
EMIT_FLAG_ROTATION_SCALE = RS::PARTICLES_EMIT_FLAG_ROTATION_SCALE,
|
||||
EMIT_FLAG_VELOCITY = RS::PARTICLES_EMIT_FLAG_VELOCITY,
|
||||
EMIT_FLAG_COLOR = RS::PARTICLES_EMIT_FLAG_COLOR,
|
||||
EMIT_FLAG_CUSTOM = RS::PARTICLES_EMIT_FLAG_CUSTOM
|
||||
};
|
||||
|
||||
void emit_particle(const Transform2D &p_transform, const Vector2 &p_velocity, const Color &p_color, const Color &p_custom, uint32_t p_emit_flags);
|
||||
|
||||
void restart();
|
||||
Rect2 capture_rect() const;
|
||||
GPUParticles2D();
|
||||
@ -146,5 +161,6 @@ public:
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST(GPUParticles2D::DrawOrder)
|
||||
VARIANT_ENUM_CAST(GPUParticles2D::EmitFlags)
|
||||
|
||||
#endif // PARTICLES_2D_H
|
||||
|
||||
Reference in New Issue
Block a user