diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-04-05 18:50:09 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-04-05 18:50:09 -0300 |
commit | b4969373b3475799d6b24cdffeda4659c37f0b8a (patch) | |
tree | 5cafdea68a5fe1f79c343c7cdf8def821e7f0b05 /scene/2d/ray_cast_2d.h | |
parent | 9f33134c93ecbadda70e8eefc50563e29b2eb7f2 (diff) | |
download | redot-engine-b4969373b3475799d6b24cdffeda4659c37f0b8a.tar.gz |
-HttpClient: ’Content-Length’ is added to httprequest if not provided in the headers and a body exists
-expressions in GDScript can take multiple lines if inside parenthesis (python-like)
-Added \ to force linebreaks to GDscript (python-like)
-added exclude objects from raycast
-fixed crashes
Diffstat (limited to 'scene/2d/ray_cast_2d.h')
-rw-r--r-- | scene/2d/ray_cast_2d.h | 88 |
1 files changed, 48 insertions, 40 deletions
diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h index 62bcb946a6..32b95fbefe 100644 --- a/scene/2d/ray_cast_2d.h +++ b/scene/2d/ray_cast_2d.h @@ -26,43 +26,51 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef RAY_CAST_2D_H
-#define RAY_CAST_2D_H
-
-#include "scene/2d/node_2d.h"
-
-class RayCast2D : public Node2D {
-
- OBJ_TYPE(RayCast2D,Node2D);
-
-
- bool enabled;
- bool collided;
- ObjectID against;
- int against_shape;
- Vector2 collision_point;
- Vector2 collision_normal;
-
- Vector2 cast_to;
-protected:
-
- void _notification(int p_what);
- static void _bind_methods();
-public:
-
- void set_enabled(bool p_enabled);
- bool is_enabled() const;
-
- void set_cast_to(const Vector2& p_point);
- Vector2 get_cast_to() const;
-
- bool is_colliding() const;
- Object *get_collider() const;
- int get_collider_shape() const;
- Vector2 get_collision_point() const;
- Vector2 get_collision_normal() const;
-
- RayCast2D();
-};
-
-#endif // RAY_CAST_2D_H
+#ifndef RAY_CAST_2D_H +#define RAY_CAST_2D_H + +#include "scene/2d/node_2d.h" + +class RayCast2D : public Node2D { + + OBJ_TYPE(RayCast2D,Node2D); + + + bool enabled; + bool collided; + ObjectID against; + int against_shape; + Vector2 collision_point; + Vector2 collision_normal; + Set<RID> exclude; + + + Vector2 cast_to; +protected: + + void _notification(int p_what); + static void _bind_methods(); +public: + + void set_enabled(bool p_enabled); + bool is_enabled() const; + + void set_cast_to(const Vector2& p_point); + Vector2 get_cast_to() const; + + bool is_colliding() const; + Object *get_collider() const; + int get_collider_shape() const; + Vector2 get_collision_point() const; + Vector2 get_collision_normal() const; + + void add_exception_rid(const RID& p_rid); + void add_exception(const Object* p_object); + void remove_exception_rid(const RID& p_rid); + void remove_exception(const Object* p_object); + void clear_exceptions(); + + RayCast2D(); +}; + +#endif // RAY_CAST_2D_H |