Now CharacterSkeleton2D inherits from YSort. It disables sorting by default, so the default behaviour won't change.

This commit is contained in:
Relintai 2024-03-17 14:15:52 +01:00
parent 5b18493589
commit d395657ee1
3 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CharacterSkeleton2D" inherits="Node2D" version="4.3">
<class name="CharacterSkeleton2D" inherits="YSort" version="4.3">
<brief_description>
</brief_description>
<description>

View File

@ -454,6 +454,8 @@ Array CharacterSkeleton2D::bake_mesh_array_uv(Array arr, Ref<Texture> tex, float
}
CharacterSkeleton2D::CharacterSkeleton2D() {
set_sort_enabled(false);
_model_dirty = false;
_model_index = 0;
_entity_type = 0;

View File

@ -36,7 +36,7 @@
#include "core/string/node_path.h"
#include "core/string/ustring.h"
#include "scene/main/node_2d.h"
#include "scene/2d/y_sort.h"
#include "scene/main/node.h"
@ -54,8 +54,8 @@
class ModelVisual;
class CharacterSkeleton2D : public Node2D {
GDCLASS(CharacterSkeleton2D, Node2D);
class CharacterSkeleton2D : public YSort {
GDCLASS(CharacterSkeleton2D, YSort);
public:
int get_entity_type() const;