diff options
author | Carl Olsson <carl.olsson@gmail.com> | 2015-03-23 08:19:20 +1000 |
---|---|---|
committer | Carl Olsson <carl.olsson@gmail.com> | 2015-03-23 08:19:20 +1000 |
commit | fb2cdfe7edcc2ccafea7604afd104f582e5b9c17 (patch) | |
tree | d9555d9519648f95d7ed3663fbca50978bb12a1f /servers/physics_2d/physics_2d_server_sw.cpp | |
parent | 41686d5fdd0d72f167894f976d19b177789f1f63 (diff) | |
parent | e9f94ce8d2cc6805e74fffdf733e6dc5b5c530f5 (diff) |
Merge branch 'master' of https://github.com/not-surt/godot into snapping2
Conflicts:
tools/editor/plugins/canvas_item_editor_plugin.cpp
tools/editor/plugins/canvas_item_editor_plugin.h
Diffstat (limited to 'servers/physics_2d/physics_2d_server_sw.cpp')
-rw-r--r-- | servers/physics_2d/physics_2d_server_sw.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index be49955055..883acd0200 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -463,6 +463,24 @@ Matrix32 Physics2DServerSW::area_get_transform(RID p_area) const { return area->get_transform(); }; +void Physics2DServerSW::area_set_pickable(RID p_area,bool p_pickable) { + + Area2DSW *area = area_owner.get(p_area); + ERR_FAIL_COND(!area); + area->set_pickable(p_pickable); + +} + +void Physics2DServerSW::area_set_monitorable(RID p_area,bool p_monitorable) { + + Area2DSW *area = area_owner.get(p_area); + ERR_FAIL_COND(!area); + + area->set_monitorable(p_monitorable); + +} + + void Physics2DServerSW::area_set_monitor_callback(RID p_area,Object *p_receiver,const StringName& p_method) { Area2DSW *area = area_owner.get(p_area); @@ -473,6 +491,14 @@ void Physics2DServerSW::area_set_monitor_callback(RID p_area,Object *p_receiver, } +void Physics2DServerSW::area_set_area_monitor_callback(RID p_area,Object *p_receiver,const StringName& p_method) { + + + Area2DSW *area = area_owner.get(p_area); + ERR_FAIL_COND(!area); + + area->set_area_monitor_callback(p_receiver?p_receiver->get_instance_ID():0,p_method); +} /* BODY API */ @@ -925,6 +951,13 @@ bool Physics2DServerSW::body_collide_shape(RID p_body, int p_body_shape, RID p_s } +void Physics2DServerSW::body_set_pickable(RID p_body,bool p_pickable) { + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND(!body); + body->set_pickable(p_pickable); + +} /* JOINT API */ |