Reverse the order of the getter and setter to match the style I use.

This commit is contained in:
Relintai 2021-08-25 22:29:00 +02:00
parent c6f6871fc2
commit 6f7b618622
2 changed files with 8 additions and 8 deletions

View File

@ -51,14 +51,18 @@ void PropInstance::set_material(const Ref<Material> &material) {
_material = material; _material = material;
} }
uint32_t PropInstance::get_collision_layer() const {
return _collision_layer;
}
void PropInstance::set_collision_layer(uint32_t p_layer) { void PropInstance::set_collision_layer(uint32_t p_layer) {
_collision_layer = p_layer; _collision_layer = p_layer;
collision_layer_changed(); collision_layer_changed();
} }
uint32_t PropInstance::get_collision_layer() const { uint32_t PropInstance::get_collision_mask() const {
return _collision_layer; return _collision_mask;
} }
void PropInstance::set_collision_mask(uint32_t p_mask) { void PropInstance::set_collision_mask(uint32_t p_mask) {
@ -67,10 +71,6 @@ void PropInstance::set_collision_mask(uint32_t p_mask) {
collision_mask_changed(); collision_mask_changed();
} }
uint32_t PropInstance::get_collision_mask() const {
return _collision_mask;
}
void PropInstance::collision_layer_changed() { void PropInstance::collision_layer_changed() {
} }

View File

@ -49,11 +49,11 @@ public:
Ref<Material> get_material(); Ref<Material> get_material();
void set_material(const Ref<Material> &material); void set_material(const Ref<Material> &material);
void set_collision_layer(uint32_t p_layer);
uint32_t get_collision_layer() const; uint32_t get_collision_layer() const;
void set_collision_layer(uint32_t p_layer);
void set_collision_mask(uint32_t p_mask);
uint32_t get_collision_mask() const; uint32_t get_collision_mask() const;
void set_collision_mask(uint32_t p_mask);
virtual void collision_layer_changed(); virtual void collision_layer_changed();
virtual void collision_mask_changed(); virtual void collision_mask_changed();