Update class reference

This commit is contained in:
Poommetee Ketson
2017-08-02 20:00:24 +07:00
parent a5272fc63a
commit cd7d443fb2
131 changed files with 3331 additions and 2012 deletions

View File

@@ -21,28 +21,28 @@ Member Functions
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_build_mode<class_CollisionPolygon2D_get_build_mode>` **(** **)** const |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_collision_object_first_shape<class_CollisionPolygon2D_get_collision_object_first_shape>` **(** **)** const |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_collision_object_last_shape<class_CollisionPolygon2D_get_collision_object_last_shape>` **(** **)** const |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PoolVector2Array<class_poolvector2array>` | :ref:`get_polygon<class_CollisionPolygon2D_get_polygon>` **(** **)** const |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_trigger<class_CollisionPolygon2D_is_trigger>` **(** **)** const |
| :ref:`bool<class_bool>` | :ref:`is_disabled<class_CollisionPolygon2D_is_disabled>` **(** **)** const |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_one_way_collision_enabled<class_CollisionPolygon2D_is_one_way_collision_enabled>` **(** **)** const |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_build_mode<class_CollisionPolygon2D_set_build_mode>` **(** :ref:`int<class_int>` build_mode **)** |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_polygon<class_CollisionPolygon2D_set_polygon>` **(** :ref:`PoolVector2Array<class_poolvector2array>` polygon **)** |
| void | :ref:`set_disabled<class_CollisionPolygon2D_set_disabled>` **(** :ref:`bool<class_bool>` disabled **)** |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_trigger<class_CollisionPolygon2D_set_trigger>` **(** :ref:`bool<class_bool>` trigger **)** |
| void | :ref:`set_one_way_collision<class_CollisionPolygon2D_set_one_way_collision>` **(** :ref:`bool<class_bool>` enabled **)** |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_polygon<class_CollisionPolygon2D_set_polygon>` **(** :ref:`PoolVector2Array<class_poolvector2array>` polygon **)** |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
Member Variables
----------------
- :ref:`int<class_int>` **build_mode**
- :ref:`bool<class_bool>` **disabled**
- :ref:`bool<class_bool>` **one_way_collision**
- :ref:`PoolVector2Array<class_poolvector2array>` **polygon**
- :ref:`Vector2<class_vector2>` **shape_range**
- :ref:`bool<class_bool>` **trigger**
Description
-----------
@@ -58,33 +58,19 @@ Member Function Description
Return whether the polygon is a :ref:`ConvexPolygonShape2D<class_convexpolygonshape2d>` (``build_mode==0``), or a :ref:`ConcavePolygonShape2D<class_concavepolygonshape2d>` (``build_mode==1``).
.. _class_CollisionPolygon2D_get_collision_object_first_shape:
- :ref:`int<class_int>` **get_collision_object_first_shape** **(** **)** const
Return the index of the first shape generated by the editor.
When ``build_mode`` is set to generate convex polygons, the shape shown in the editor may be decomposed into many convex polygons. In that case, a range of indexes is needed to directly access the :ref:`Shape2D<class_shape2d>`.
When ``build_mode`` is set to generate concave polygons, there is only one :ref:`Shape2D<class_shape2d>` generated, so the start index and the end index are the same.
.. _class_CollisionPolygon2D_get_collision_object_last_shape:
- :ref:`int<class_int>` **get_collision_object_last_shape** **(** **)** const
Return the index of the last shape generated by the editor.
.. _class_CollisionPolygon2D_get_polygon:
- :ref:`PoolVector2Array<class_poolvector2array>` **get_polygon** **(** **)** const
Return the list of points that define the polygon.
.. _class_CollisionPolygon2D_is_trigger:
.. _class_CollisionPolygon2D_is_disabled:
- :ref:`bool<class_bool>` **is_trigger** **(** **)** const
- :ref:`bool<class_bool>` **is_disabled** **(** **)** const
Return whether this polygon is a trigger.
.. _class_CollisionPolygon2D_is_one_way_collision_enabled:
- :ref:`bool<class_bool>` **is_one_way_collision_enabled** **(** **)** const
.. _class_CollisionPolygon2D_set_build_mode:
@@ -92,6 +78,14 @@ Return whether this polygon is a trigger.
Set whether the polygon is to be a :ref:`ConvexPolygonShape2D<class_convexpolygonshape2d>` (``build_mode==0``), or a :ref:`ConcavePolygonShape2D<class_concavepolygonshape2d>` (``build_mode==1``).
.. _class_CollisionPolygon2D_set_disabled:
- void **set_disabled** **(** :ref:`bool<class_bool>` disabled **)**
.. _class_CollisionPolygon2D_set_one_way_collision:
- void **set_one_way_collision** **(** :ref:`bool<class_bool>` enabled **)**
.. _class_CollisionPolygon2D_set_polygon:
- void **set_polygon** **(** :ref:`PoolVector2Array<class_poolvector2array>` polygon **)**
@@ -100,10 +94,4 @@ Set the array of points forming the polygon.
When editing the point list via the editor, depending on :ref:`get_build_mode<class_CollisionPolygon2D_get_build_mode>`, it has to be a list of points (for ``build_mode==0``), or a list of lines (for ``build_mode==1``). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point.
.. _class_CollisionPolygon2D_set_trigger:
- void **set_trigger** **(** :ref:`bool<class_bool>` trigger **)**
Set whether this polygon is a trigger. A trigger polygon detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked).