Use rectangle size instead of extents for Shape dimensions
This commit is contained in:
parent
0f6745b6aa
commit
d5d99aaed6
5 changed files with 26 additions and 26 deletions
|
|
@ -36,15 +36,15 @@
|
|||
class RectangleShape2D : public Shape2D {
|
||||
GDCLASS(RectangleShape2D, Shape2D);
|
||||
|
||||
Vector2 extents;
|
||||
Vector2 size;
|
||||
void _update_shape();
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void set_extents(const Vector2 &p_extents);
|
||||
Vector2 get_extents() const;
|
||||
void set_size(const Vector2 &p_size);
|
||||
Vector2 get_size() const;
|
||||
|
||||
virtual void draw(const RID &p_to_rid, const Color &p_color) override;
|
||||
virtual Rect2 get_rect() const override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue