diff options
Diffstat (limited to 'scene/2d/ray_cast_2d.cpp')
-rw-r--r-- | scene/2d/ray_cast_2d.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp index bd7f4faae5..14dfc10d9f 100644 --- a/scene/2d/ray_cast_2d.cpp +++ b/scene/2d/ray_cast_2d.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -161,7 +161,7 @@ void RayCast2D::_notification(int p_what) { if (!get_tree()->is_editor_hint() && !get_tree()->is_debugging_collisions_hint()) break; - Matrix32 xf; + Transform2D xf; xf.rotate(cast_to.angle()); xf.translate(Vector2(0,cast_to.length())); @@ -201,7 +201,7 @@ void RayCast2D::_update_raycast_state() { Physics2DDirectSpaceState *dss = Physics2DServer::get_singleton()->space_get_direct_state(w2d->get_space()); ERR_FAIL_COND( !dss ); - Matrix32 gt = get_global_transform(); + Transform2D gt = get_global_transform(); Vector2 to = cast_to; if (to==Vector2()) @@ -263,41 +263,41 @@ void RayCast2D::clear_exceptions(){ void RayCast2D::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_enabled","enabled"),&RayCast2D::set_enabled); - ObjectTypeDB::bind_method(_MD("is_enabled"),&RayCast2D::is_enabled); + ClassDB::bind_method(_MD("set_enabled","enabled"),&RayCast2D::set_enabled); + ClassDB::bind_method(_MD("is_enabled"),&RayCast2D::is_enabled); - ObjectTypeDB::bind_method(_MD("set_cast_to","local_point"),&RayCast2D::set_cast_to); - ObjectTypeDB::bind_method(_MD("get_cast_to"),&RayCast2D::get_cast_to); + ClassDB::bind_method(_MD("set_cast_to","local_point"),&RayCast2D::set_cast_to); + ClassDB::bind_method(_MD("get_cast_to"),&RayCast2D::get_cast_to); - ObjectTypeDB::bind_method(_MD("is_colliding"),&RayCast2D::is_colliding); - ObjectTypeDB::bind_method(_MD("force_raycast_update"),&RayCast2D::force_raycast_update); + ClassDB::bind_method(_MD("is_colliding"),&RayCast2D::is_colliding); + ClassDB::bind_method(_MD("force_raycast_update"),&RayCast2D::force_raycast_update); - ObjectTypeDB::bind_method(_MD("get_collider"),&RayCast2D::get_collider); - ObjectTypeDB::bind_method(_MD("get_collider_shape"),&RayCast2D::get_collider_shape); - ObjectTypeDB::bind_method(_MD("get_collision_point"),&RayCast2D::get_collision_point); - ObjectTypeDB::bind_method(_MD("get_collision_normal"),&RayCast2D::get_collision_normal); + ClassDB::bind_method(_MD("get_collider"),&RayCast2D::get_collider); + ClassDB::bind_method(_MD("get_collider_shape"),&RayCast2D::get_collider_shape); + ClassDB::bind_method(_MD("get_collision_point"),&RayCast2D::get_collision_point); + ClassDB::bind_method(_MD("get_collision_normal"),&RayCast2D::get_collision_normal); - ObjectTypeDB::bind_method(_MD("add_exception_rid","rid"),&RayCast2D::add_exception_rid); - ObjectTypeDB::bind_method(_MD("add_exception","node"),&RayCast2D::add_exception); + ClassDB::bind_method(_MD("add_exception_rid","rid"),&RayCast2D::add_exception_rid); + ClassDB::bind_method(_MD("add_exception","node"),&RayCast2D::add_exception); - ObjectTypeDB::bind_method(_MD("remove_exception_rid","rid"),&RayCast2D::remove_exception_rid); - ObjectTypeDB::bind_method(_MD("remove_exception","node"),&RayCast2D::remove_exception); + ClassDB::bind_method(_MD("remove_exception_rid","rid"),&RayCast2D::remove_exception_rid); + ClassDB::bind_method(_MD("remove_exception","node"),&RayCast2D::remove_exception); - ObjectTypeDB::bind_method(_MD("clear_exceptions"),&RayCast2D::clear_exceptions); + ClassDB::bind_method(_MD("clear_exceptions"),&RayCast2D::clear_exceptions); - ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"),&RayCast2D::set_layer_mask); - ObjectTypeDB::bind_method(_MD("get_layer_mask"),&RayCast2D::get_layer_mask); + ClassDB::bind_method(_MD("set_layer_mask","mask"),&RayCast2D::set_layer_mask); + ClassDB::bind_method(_MD("get_layer_mask"),&RayCast2D::get_layer_mask); - ObjectTypeDB::bind_method(_MD("set_type_mask","mask"),&RayCast2D::set_type_mask); - ObjectTypeDB::bind_method(_MD("get_type_mask"),&RayCast2D::get_type_mask); + ClassDB::bind_method(_MD("set_type_mask","mask"),&RayCast2D::set_type_mask); + ClassDB::bind_method(_MD("get_type_mask"),&RayCast2D::get_type_mask); - ObjectTypeDB::bind_method(_MD("set_exclude_parent_body","mask"),&RayCast2D::set_exclude_parent_body); - ObjectTypeDB::bind_method(_MD("get_exclude_parent_body"),&RayCast2D::get_exclude_parent_body); + ClassDB::bind_method(_MD("set_exclude_parent_body","mask"),&RayCast2D::set_exclude_parent_body); + ClassDB::bind_method(_MD("get_exclude_parent_body"),&RayCast2D::get_exclude_parent_body); ADD_PROPERTY(PropertyInfo(Variant::BOOL,"enabled"),_SCS("set_enabled"),_SCS("is_enabled")); ADD_PROPERTY(PropertyInfo(Variant::BOOL,"exclude_parent"),_SCS("set_exclude_parent_body"),_SCS("get_exclude_parent_body")); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"cast_to"),_SCS("set_cast_to"),_SCS("get_cast_to")); - ADD_PROPERTY(PropertyInfo(Variant::INT,"layer_mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_layer_mask"),_SCS("get_layer_mask")); + ADD_PROPERTY(PropertyInfo(Variant::INT,"layer_mask",PROPERTY_HINT_LAYERS_2D_PHYSICS),_SCS("set_layer_mask"),_SCS("get_layer_mask")); ADD_PROPERTY(PropertyInfo(Variant::INT,"type_mask",PROPERTY_HINT_FLAGS,"Static,Kinematic,Rigid,Character,Area"),_SCS("set_type_mask"),_SCS("get_type_mask")); } |