29 #ifndef ANIMATED_SPRITE_H 30 #define ANIMATED_SPRITE_H 32 #include "scene/2d/node_2d.h" 33 #include "scene/resources/texture.h" 42 Array _get_frames()
const;
43 void _set_frames(
const Array& p_frames);
46 static void _bind_methods();
51 void add_frame(
const Ref<Texture>& p_frame,
int p_at_pos=-1);
52 int get_frame_count()
const;
53 _FORCE_INLINE_
Ref<Texture> get_frame(
int p_idx)
const { ERR_FAIL_INDEX_V(p_idx,frames.size(),
Ref<Texture>());
return frames[p_idx]; }
54 void set_frame(
int p_idx,
const Ref<Texture>& p_frame){ ERR_FAIL_INDEX(p_idx,frames.size()); frames[p_idx]=p_frame; }
55 void remove_frame(
int p_idx);
82 static void _bind_methods();
83 void _notification(
int p_what);
88 virtual void edit_set_pivot(
const Point2& p_pivot);
89 virtual Point2 edit_get_pivot()
const;
90 virtual bool edit_has_pivot()
const;
95 void set_frame(
int p_frame);
96 int get_frame()
const;
98 void set_centered(
bool p_center);
99 bool is_centered()
const;
101 void set_offset(
const Point2& p_offset);
102 Point2 get_offset()
const;
104 void set_flip_h(
bool p_flip);
105 bool is_flipped_h()
const;
107 void set_flip_v(
bool p_flip);
108 bool is_flipped_v()
const;
110 void set_modulate(
const Color& p_color);
111 Color get_modulate()
const;
113 virtual Rect2 get_item_rect()
const;
119 #endif // ANIMATED_SPRITE_H
Definition: math_2d.h:204
Definition: resource.h:89
Definition: animated_sprite.h:36
Definition: animated_sprite.h:64