entity_spell_system/skeleton/skeleton_model_entry.cpp

59 lines
1.8 KiB
C++
Raw Normal View History

2019-10-25 15:52:58 +02:00
#include "skeleton_model_entry.h"
2019-10-26 03:38:09 +02:00
int SkeletonModelEntry::get_count() const {
return _count;
}
void SkeletonModelEntry::set_count(const int value) {
_count = value;
}
int SkeletonModelEntry::get_priority() const {
2019-10-25 15:52:58 +02:00
return _priority;
}
2019-10-26 03:38:09 +02:00
void SkeletonModelEntry::set_priority(const int value) {
2019-10-25 15:52:58 +02:00
_priority = value;
}
2019-10-26 03:38:09 +02:00
Color SkeletonModelEntry::get_color() const {
2019-10-25 15:52:58 +02:00
return _color;
}
2019-10-26 03:38:09 +02:00
void SkeletonModelEntry::set_color(const Color value) {
2019-10-25 15:52:58 +02:00
_color = value;
}
Ref<ItemVisualEntry> SkeletonModelEntry::get_entry() {
return _entry;
}
void SkeletonModelEntry::set_entry(Ref<ItemVisualEntry> entry) {
_entry = entry;
}
SkeletonModelEntry::SkeletonModelEntry() {
2019-10-26 03:38:09 +02:00
_count = 1;
2019-10-25 15:52:58 +02:00
_priority = 0;
_color = Color(1, 1, 1, 1);
}
SkeletonModelEntry::~SkeletonModelEntry() {
_entry.unref();
}
void SkeletonModelEntry::_bind_methods() {
2019-10-26 03:38:09 +02:00
ClassDB::bind_method(D_METHOD("get_count"), &SkeletonModelEntry::get_count);
ClassDB::bind_method(D_METHOD("set_count", "value"), &SkeletonModelEntry::set_count);
ADD_PROPERTY(PropertyInfo(Variant::INT, "count"), "set_count", "get_count");
2019-10-25 15:52:58 +02:00
ClassDB::bind_method(D_METHOD("get_priority"), &SkeletonModelEntry::get_priority);
ClassDB::bind_method(D_METHOD("set_priority", "value"), &SkeletonModelEntry::set_priority);
ADD_PROPERTY(PropertyInfo(Variant::INT, "priority"), "set_priority", "get_priority");
ClassDB::bind_method(D_METHOD("get_color"), &SkeletonModelEntry::get_color);
ClassDB::bind_method(D_METHOD("set_color", "value"), &SkeletonModelEntry::set_color);
ADD_PROPERTY(PropertyInfo(Variant::INT, "color"), "set_color", "get_color");
ClassDB::bind_method(D_METHOD("get_entry"), &SkeletonModelEntry::get_entry);
ClassDB::bind_method(D_METHOD("set_entry", "path"), &SkeletonModelEntry::set_entry);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "entry", PROPERTY_HINT_RESOURCE_TYPE, "ItemVisualEntry"), "set_entry", "get_entry");
}