diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/area_2d.cpp | 8 | ||||
-rw-r--r-- | scene/2d/audio_stream_player_2d.cpp | 3 | ||||
-rw-r--r-- | scene/2d/canvas_item.cpp | 1 | ||||
-rw-r--r-- | scene/2d/line_builder.cpp | 55 | ||||
-rw-r--r-- | scene/2d/path_2d.cpp | 3 |
5 files changed, 39 insertions, 31 deletions
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index 1124904963..9fc6c8d23a 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -596,7 +596,7 @@ void Area2D::_bind_methods() { ClassDB::bind_method(D_METHOD("_area_enter_tree", "id"), &Area2D::_area_enter_tree); ClassDB::bind_method(D_METHOD("_area_exit_tree", "id"), &Area2D::_area_exit_tree); - ClassDB::bind_method(D_METHOD("set_space_override_mode", "enable"), &Area2D::set_space_override_mode); + ClassDB::bind_method(D_METHOD("set_space_override_mode", "space_override_mode"), &Area2D::set_space_override_mode); ClassDB::bind_method(D_METHOD("get_space_override_mode"), &Area2D::get_space_override_mode); ClassDB::bind_method(D_METHOD("set_gravity_is_point", "enable"), &Area2D::set_gravity_is_point); @@ -680,6 +680,12 @@ void Area2D::_bind_methods() { ADD_GROUP("Audio Bus", "audio_bus_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus", "get_audio_bus"); + + BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED); + BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE); + BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE_REPLACE); + BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE); + BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE_COMBINE); } Area2D::Area2D() diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index ea2e77fc47..d2a8e3315a 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -254,8 +254,6 @@ void AudioStreamPlayer2D::set_stream(Ref<AudioStream> p_stream) { stream.unref(); ERR_FAIL_COND(stream_playback.is_null()); } - - } Ref<AudioStream> AudioStreamPlayer2D::get_stream() const { @@ -449,7 +447,6 @@ void AudioStreamPlayer2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask"); ADD_SIGNAL(MethodInfo("finished")); - } AudioStreamPlayer2D::AudioStreamPlayer2D() { diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index a7c5d1adbb..ec1ea7df38 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -338,7 +338,6 @@ void CanvasItem::_update_callback() { notification(NOTIFICATION_DRAW); emit_signal(SceneStringNames::get_singleton()->draw); if (get_script_instance()) { - Variant::CallError err; get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_draw, NULL, 0); } drawing = false; diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp index 1235013af4..53db30e3ce 100644 --- a/scene/2d/line_builder.cpp +++ b/scene/2d/line_builder.cpp @@ -173,13 +173,15 @@ void LineBuilder::build() { strip_begin(pos_up0, pos_down0, color0, uvx0); - // pos_up0 ------------- pos_up1 -------------------- - // | | - // pos0 - - - - - - - - - pos1 - - - - - - - - - pos2 - // | | - // pos_down0 ------------ pos_down1 ------------------ - // - // i-1 i i+1 + /* + * pos_up0 ------------- pos_up1 -------------------- + * | | + * pos0 - - - - - - - - - pos1 - - - - - - - - - pos2 + * | | + * pos_down0 ------------ pos_down1 ------------------ + * + * i-1 i i+1 + */ // http://labs.hyperandroid.com/tag/opengl-lines // (not the same implementation but visuals help a lot) @@ -206,17 +208,19 @@ void LineBuilder::build() { inner_normal1 = -u1 * hw; } - // --------------------------- - // / - // 0 / 1 - // / / - // --------------------x------ / - // / / (here shown with orientation == DOWN) - // / / - // / / - // / / - // 2 / - // / + /* + * --------------------------- + * / + * 0 / 1 + * / / + * --------------------x------ / + * / / (here shown with orientation == DOWN) + * / / + * / / + * / / + * 2 / + * / + */ // Find inner intersection at the joint Vector2 corner_pos_in, corner_pos_out; @@ -315,13 +319,14 @@ void LineBuilder::build() { // Add joint geometry if (current_joint_mode != LINE_JOINT_SHARP) { - // ________________ cbegin - // / \ - // / \ - // ____________/_ _ _\ cend - // | | - // | | - // | | + /* ________________ cbegin + * / \ + * / \ + * ____________/_ _ _\ cend + * | | + * | | + * | | + */ Vector2 cbegin, cend; if (orientation == UP) { diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 1d7bd8fc2a..9bd5576d91 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -137,7 +137,8 @@ void PathFollow2D::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { - if ((path = Object::cast_to<Path2D>(get_parent()))) { + path = Object::cast_to<Path2D>(get_parent()); + if (path) { _update_transform(); } |