Unify and streamline connecting to Resource changes
This commit is contained in:
parent
2c55214068
commit
de4a3fa151
98 changed files with 341 additions and 434 deletions
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include "cpu_particles_2d.h"
|
||||
|
||||
#include "core/core_string_names.h"
|
||||
#include "scene/2d/gpu_particles_2d.h"
|
||||
#include "scene/resources/atlas_texture.h"
|
||||
#include "scene/resources/curve_texture.h"
|
||||
|
|
@ -207,13 +206,13 @@ void CPUParticles2D::set_texture(const Ref<Texture2D> &p_texture) {
|
|||
}
|
||||
|
||||
if (texture.is_valid()) {
|
||||
texture->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CPUParticles2D::_texture_changed));
|
||||
texture->disconnect_changed(callable_mp(this, &CPUParticles2D::_texture_changed));
|
||||
}
|
||||
|
||||
texture = p_texture;
|
||||
|
||||
if (texture.is_valid()) {
|
||||
texture->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &CPUParticles2D::_texture_changed));
|
||||
texture->connect_changed(callable_mp(this, &CPUParticles2D::_texture_changed));
|
||||
}
|
||||
|
||||
queue_redraw();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue