avoid function naming conflict on light scale

This commit is contained in:
Juan Linietsky 2015-03-22 10:39:32 -03:00
parent a93e33f5c8
commit 92ab362afa
2 changed files with 7 additions and 7 deletions

View File

@ -96,7 +96,7 @@ float Light2D::get_height() const {
return height; return height;
} }
void Light2D::set_scale( float p_scale) { void Light2D::set_texture_scale( float p_scale) {
_scale=p_scale; _scale=p_scale;
VS::get_singleton()->canvas_light_set_scale(canvas_light,_scale); VS::get_singleton()->canvas_light_set_scale(canvas_light,_scale);
@ -105,7 +105,7 @@ void Light2D::set_scale( float p_scale) {
} }
float Light2D::get_scale() const { float Light2D::get_texture_scale() const {
return _scale; return _scale;
} }
@ -260,8 +260,8 @@ void Light2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_height","height"),&Light2D::set_height); ObjectTypeDB::bind_method(_MD("set_height","height"),&Light2D::set_height);
ObjectTypeDB::bind_method(_MD("get_height"),&Light2D::get_height); ObjectTypeDB::bind_method(_MD("get_height"),&Light2D::get_height);
ObjectTypeDB::bind_method(_MD("set_scale","scale"),&Light2D::set_scale); ObjectTypeDB::bind_method(_MD("set_texture_scale","texture_scale"),&Light2D::set_texture_scale);
ObjectTypeDB::bind_method(_MD("get_scale"),&Light2D::get_scale); ObjectTypeDB::bind_method(_MD("get_texture_scale"),&Light2D::get_texture_scale);
ObjectTypeDB::bind_method(_MD("set_z_range_min","z"),&Light2D::set_z_range_min); ObjectTypeDB::bind_method(_MD("set_z_range_min","z"),&Light2D::set_z_range_min);
@ -298,7 +298,7 @@ void Light2D::_bind_methods() {
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"enabled"),_SCS("set_enabled"),_SCS("is_enabled")); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"enabled"),_SCS("set_enabled"),_SCS("is_enabled"));
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture")); ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"));
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"offset"),_SCS("set_texture_offset"),_SCS("get_texture_offset")); ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"offset"),_SCS("set_texture_offset"),_SCS("get_texture_offset"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"scale",PROPERTY_HINT_RANGE,"0.01,4096,0.01"),_SCS("set_scale"),_SCS("get_scale")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"scale",PROPERTY_HINT_RANGE,"0.01,4096,0.01"),_SCS("set_texture_scale"),_SCS("get_texture_scale"));
ADD_PROPERTY( PropertyInfo(Variant::COLOR,"color"),_SCS("set_color"),_SCS("get_color")); ADD_PROPERTY( PropertyInfo(Variant::COLOR,"color"),_SCS("set_color"),_SCS("get_color"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"subtract"),_SCS("set_subtract_mode"),_SCS("get_subtract_mode")); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"subtract"),_SCS("set_subtract_mode"),_SCS("get_subtract_mode"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"range/height"),_SCS("set_height"),_SCS("get_height")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"range/height"),_SCS("set_height"),_SCS("get_height"));

View File

@ -51,8 +51,8 @@ public:
void set_height( float p_height); void set_height( float p_height);
float get_height() const; float get_height() const;
void set_scale( float p_scale); void set_texture_scale( float p_scale);
float get_scale() const; float get_texture_scale() const;
void set_z_range_min( int p_min_z); void set_z_range_min( int p_min_z);
int get_z_range_min() const; int get_z_range_min() const;