aboutsummaryrefslogtreecommitdiff
path: root/scene/2d/particles_2d.cpp
diff options
context:
space:
mode:
authorMrCdK2017-12-23 05:08:50 +0100
committerMrCdK2017-12-23 05:23:41 +0100
commit1f609b7a8221f623ae0c051cbaf44f955c8d97bb (patch)
treee856988c334740b81c844175049e1aa4f02f70f1 /scene/2d/particles_2d.cpp
parent6eb030e24cf35ab1017f0157d92b0161ec856086 (diff)
downloadgodot-1f609b7a8221f623ae0c051cbaf44f955c8d97bb.tar.gz
godot-1f609b7a8221f623ae0c051cbaf44f955c8d97bb.tar.zst
godot-1f609b7a8221f623ae0c051cbaf44f955c8d97bb.zip
Diffstat (limited to 'scene/2d/particles_2d.cpp')
-rw-r--r--scene/2d/particles_2d.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index 7d5355721..cc3829ad0 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -35,8 +35,7 @@
void Particles2D::set_emitting(bool p_emitting) {
- emitting = p_emitting;
- VS::get_singleton()->particles_set_emitting(particles, emitting);
+ VS::get_singleton()->particles_set_emitting(particles, p_emitting);
}
void Particles2D::set_amount(int p_amount) {
@@ -56,7 +55,7 @@ void Particles2D::set_one_shot(bool p_enable) {
one_shot = p_enable;
VS::get_singleton()->particles_set_one_shot(particles, one_shot);
- if (!one_shot && emitting)
+ if (!one_shot && is_emitting())
VisualServer::get_singleton()->particles_restart(particles);
}
void Particles2D::set_pre_process_time(float p_time) {
@@ -134,7 +133,7 @@ void Particles2D::set_speed_scale(float p_scale) {
bool Particles2D::is_emitting() const {
- return emitting;
+ return VS::get_singleton()->particles_get_emitting(particles);
}
int Particles2D::get_amount() const {