2020-01-31 19:34:47 +01:00
|
|
|
/*
|
|
|
|
Copyright (c) 2019-2020 Péter Magyar
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
|
|
copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2020-01-02 22:56:24 +01:00
|
|
|
#ifndef CHARACTER_SKELETON_2D_H
|
|
|
|
#define CHARACTER_SKELETON_2D_H
|
2019-05-01 02:49:06 +02:00
|
|
|
|
|
|
|
#include "scene/2d/node_2d.h"
|
|
|
|
|
|
|
|
#include "core/node_path.h"
|
|
|
|
#include "core/ustring.h"
|
2019-10-26 03:38:09 +02:00
|
|
|
#include "core/vector.h"
|
2019-05-01 02:49:06 +02:00
|
|
|
|
2019-05-13 13:25:03 +02:00
|
|
|
#include "../entity_enums.h"
|
|
|
|
|
2020-05-19 21:09:00 +02:00
|
|
|
#include "../data/items/model_visual.h"
|
2019-10-25 10:22:57 +02:00
|
|
|
|
2020-01-02 22:56:24 +01:00
|
|
|
class CharacterSkeleton2D : public Node2D {
|
|
|
|
GDCLASS(CharacterSkeleton2D, Node2D);
|
2019-05-01 02:49:06 +02:00
|
|
|
|
|
|
|
public:
|
2020-05-19 21:09:00 +02:00
|
|
|
virtual void add_model_visual(Ref<ModelVisual> vis);
|
|
|
|
virtual void remove_model_visual(Ref<ModelVisual> vis);
|
|
|
|
virtual void remove_model_visual_index(int index);
|
|
|
|
virtual Ref<ModelVisual> get_model_visual(int index);
|
|
|
|
virtual int get_model_visual_count();
|
|
|
|
virtual void clear_model_visuals();
|
2019-10-25 10:22:57 +02:00
|
|
|
|
2020-05-20 20:38:10 +02:00
|
|
|
int get_model_index();
|
|
|
|
void set_model_index(int value);
|
2019-11-03 22:39:19 +01:00
|
|
|
|
2020-01-02 22:56:24 +01:00
|
|
|
CharacterSkeleton2D();
|
|
|
|
~CharacterSkeleton2D();
|
2019-05-01 02:49:06 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
2019-07-01 01:29:59 +02:00
|
|
|
|
2019-11-03 22:39:19 +01:00
|
|
|
private:
|
2020-05-20 20:38:10 +02:00
|
|
|
int _model_index;
|
2019-05-01 02:49:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|