diff options
| author | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
| commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
| tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/2d/collision_object_2d.h | |
| parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
| download | godot-5dbf180.tar.gz godot-5dbf180.tar.zst godot-5dbf180.zip | |
A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?
I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon
A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format
A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
Diffstat (limited to 'scene/2d/collision_object_2d.h')
| -rw-r--r-- | scene/2d/collision_object_2d.h | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h index 429b4fafe..e6ea0f42d 100644 --- a/scene/2d/collision_object_2d.h +++ b/scene/2d/collision_object_2d.h @@ -34,7 +34,7 @@ class CollisionObject2D : public Node2D { - GDCLASS( CollisionObject2D, Node2D ); + GDCLASS(CollisionObject2D, Node2D); bool area; RID rid; @@ -46,42 +46,38 @@ class CollisionObject2D : public Node2D { bool trigger; ShapeData() { - trigger=false; + trigger = false; } }; - Vector<ShapeData> shapes; void _update_shapes(); -friend class CollisionShape2D; -friend class CollisionPolygon2D; + friend class CollisionShape2D; + friend class CollisionPolygon2D; void _update_shapes_from_children(); -protected: +protected: CollisionObject2D(RID p_rid, bool p_area); void _notification(int p_what); - bool _set(const StringName& p_name, const Variant& p_value); - bool _get(const StringName& p_name,Variant &r_ret) const; - void _get_property_list( List<PropertyInfo> *p_list) const; + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; static void _bind_methods(); void _update_pickable(); -friend class Viewport; - void _input_event(Node *p_viewport, const InputEvent& p_input_event, int p_shape); + friend class Viewport; + void _input_event(Node *p_viewport, const InputEvent &p_input_event, int p_shape); void _mouse_enter(); void _mouse_exit(); public: - - - - void add_shape(const Ref<Shape2D>& p_shape, const Transform2D& p_transform=Transform2D()); + void add_shape(const Ref<Shape2D> &p_shape, const Transform2D &p_transform = Transform2D()); int get_shape_count() const; - void set_shape(int p_shape_idx, const Ref<Shape2D>& p_shape); - void set_shape_transform(int p_shape_idx, const Transform2D& p_transform); + void set_shape(int p_shape_idx, const Ref<Shape2D> &p_shape); + void set_shape_transform(int p_shape_idx, const Transform2D &p_transform); Ref<Shape2D> get_shape(int p_shape_idx) const; Transform2D get_shape_transform(int p_shape_idx) const; void set_shape_as_trigger(int p_shape_idx, bool p_trigger); |
