Merge pull request #5111 from CowThing/classref-edit

Filling in documentation
This commit is contained in:
Rémi Verschelde 2016-06-08 21:41:37 +02:00
commit 73fa537472
1 changed files with 46 additions and 2 deletions

View File

@ -6025,8 +6025,10 @@
</class> </class>
<class name="BoneAttachment" inherits="Spatial" category="Core"> <class name="BoneAttachment" inherits="Spatial" category="Core">
<brief_description> <brief_description>
A node that will attach to a bone.
</brief_description> </brief_description>
<description> <description>
This node must be the child of a [Skeleton] node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone.
</description> </description>
<methods> <methods>
</methods> </methods>
@ -17560,8 +17562,12 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class> </class>
<class name="KinematicBody" inherits="PhysicsBody" category="Core"> <class name="KinematicBody" inherits="PhysicsBody" category="Core">
<brief_description> <brief_description>
Kinematic body 3D node.
</brief_description> </brief_description>
<description> <description>
Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses:
Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
Kinematic Characters: KinematicBody also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
</description> </description>
<methods> <methods>
<method name="move"> <method name="move">
@ -17570,6 +17576,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="rel_vec" type="Vector3"> <argument index="0" name="rel_vec" type="Vector3">
</argument> </argument>
<description> <description>
Move the body in the given direction, stopping if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
</description> </description>
</method> </method>
<method name="move_to"> <method name="move_to">
@ -17578,6 +17585,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="position" type="Vector3"> <argument index="0" name="position" type="Vector3">
</argument> </argument>
<description> <description>
Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
</description> </description>
</method> </method>
<method name="can_teleport_to"> <method name="can_teleport_to">
@ -17593,96 +17601,112 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return whether the body is colliding with another.
</description> </description>
</method> </method>
<method name="get_collision_pos" qualifiers="const"> <method name="get_collision_pos" qualifiers="const">
<return type="Vector3"> <return type="Vector3">
</return> </return>
<description> <description>
Return the point in space where the body is touching another. If there is no collision, this method will return (0,0,0), so collisions must be checked first with [method is_colliding].
</description> </description>
</method> </method>
<method name="get_collision_normal" qualifiers="const"> <method name="get_collision_normal" qualifiers="const">
<return type="Vector3"> <return type="Vector3">
</return> </return>
<description> <description>
Return the normal of the surface the body collided with. This is useful to implement sliding along a surface.
</description> </description>
</method> </method>
<method name="get_collider_velocity" qualifiers="const"> <method name="get_collider_velocity" qualifiers="const">
<return type="Vector3"> <return type="Vector3">
</return> </return>
<description> <description>
Return the velocity of the body that collided with this one.
</description> </description>
</method> </method>
<method name="get_collider" qualifiers="const"> <method name="get_collider" qualifiers="const">
<return type="Object"> <return type="Object">
</return> </return>
<description> <description>
Return the body that collided with this one.
</description> </description>
</method> </method>
<method name="get_collider_shape" qualifiers="const"> <method name="get_collider_shape" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the shape index from the body that collided with this one. If there is no collision, this method will return 0, so collisions must be checked first with [method is_colliding].
</description> </description>
</method> </method>
<method name="set_collide_with_static_bodies"> <method name="set_collide_with_static_bodies">
<argument index="0" name="enable" type="bool"> <argument index="0" name="enable" type="bool">
</argument> </argument>
<description> <description>
Set if this body should collide with static bodies.
</description> </description>
</method> </method>
<method name="can_collide_with_static_bodies" qualifiers="const"> <method name="can_collide_with_static_bodies" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return if this body can collide with static bodies.
</description> </description>
</method> </method>
<method name="set_collide_with_kinematic_bodies"> <method name="set_collide_with_kinematic_bodies">
<argument index="0" name="enable" type="bool"> <argument index="0" name="enable" type="bool">
</argument> </argument>
<description> <description>
Set if this body should collide with kinematic bodies.
</description> </description>
</method> </method>
<method name="can_collide_with_kinematic_bodies" qualifiers="const"> <method name="can_collide_with_kinematic_bodies" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return if this body can collide with kinematic bodies.
</description> </description>
</method> </method>
<method name="set_collide_with_rigid_bodies"> <method name="set_collide_with_rigid_bodies">
<argument index="0" name="enable" type="bool"> <argument index="0" name="enable" type="bool">
</argument> </argument>
<description> <description>
Set if this body should collide with rigid bodies.
</description> </description>
</method> </method>
<method name="can_collide_with_rigid_bodies" qualifiers="const"> <method name="can_collide_with_rigid_bodies" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return if this body can collide with rigid bodies.
</description> </description>
</method> </method>
<method name="set_collide_with_character_bodies"> <method name="set_collide_with_character_bodies">
<argument index="0" name="enable" type="bool"> <argument index="0" name="enable" type="bool">
</argument> </argument>
<description> <description>
Set if this body should collide with character bodies.
</description> </description>
</method> </method>
<method name="can_collide_with_character_bodies" qualifiers="const"> <method name="can_collide_with_character_bodies" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return if this body can collide with character bodies.
</description> </description>
</method> </method>
<method name="set_collision_margin"> <method name="set_collision_margin">
<argument index="0" name="pixels" type="float"> <argument index="0" name="pixels" type="float">
</argument> </argument>
<description> <description>
Set the collision margin for this object. A collision margin is an amount that all shapes will grow when computing collisions, to account for numerical imprecision.
</description> </description>
</method> </method>
<method name="get_collision_margin" qualifiers="const"> <method name="get_collision_margin" qualifiers="const">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Return the collision margin for this object.
</description> </description>
</method> </method>
</methods> </methods>
@ -17705,7 +17729,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="rel_vec" type="Vector2"> <argument index="0" name="rel_vec" type="Vector2">
</argument> </argument>
<description> <description>
Move the body in the given direction, stopping if there is an obstacle. Move the body in the given direction, stopping if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
</description> </description>
</method> </method>
<method name="move_to"> <method name="move_to">
@ -17714,7 +17738,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="position" type="Vector2"> <argument index="0" name="position" type="Vector2">
</argument> </argument>
<description> <description>
Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. The returned vector is how much movement was remaining before being stopped.
</description> </description>
</method> </method>
<method name="test_move"> <method name="test_move">
@ -23541,8 +23565,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class> </class>
<class name="ParallaxBackground" inherits="CanvasLayer" category="Core"> <class name="ParallaxBackground" inherits="CanvasLayer" category="Core">
<brief_description> <brief_description>
A node used to create a parallax scrolling background.
</brief_description> </brief_description>
<description> <description>
A ParallaxBackground will use one or more [ParallaxLayer] nodes to create a parallax scrolling background. Each [ParallaxLayer] can be set to move at different speeds relative to the camera movement, this can be used to create an illusion of depth in a 2D game.
</description> </description>
<methods> <methods>
<method name="set_scroll_offset"> <method name="set_scroll_offset">
@ -23561,60 +23587,70 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="ofs" type="Vector2"> <argument index="0" name="ofs" type="Vector2">
</argument> </argument>
<description> <description>
Set the base offset in pixels of all children [ParallaxLayer] nodes.
</description> </description>
</method> </method>
<method name="get_scroll_base_offset" qualifiers="const"> <method name="get_scroll_base_offset" qualifiers="const">
<return type="Vector2"> <return type="Vector2">
</return> </return>
<description> <description>
Return the base offset.
</description> </description>
</method> </method>
<method name="set_scroll_base_scale"> <method name="set_scroll_base_scale">
<argument index="0" name="scale" type="Vector2"> <argument index="0" name="scale" type="Vector2">
</argument> </argument>
<description> <description>
Set the base motion scale of all children [ParallaxLayer] nodes.
</description> </description>
</method> </method>
<method name="get_scroll_base_scale" qualifiers="const"> <method name="get_scroll_base_scale" qualifiers="const">
<return type="Vector2"> <return type="Vector2">
</return> </return>
<description> <description>
Return the base motion scale.
</description> </description>
</method> </method>
<method name="set_limit_begin"> <method name="set_limit_begin">
<argument index="0" name="ofs" type="Vector2"> <argument index="0" name="ofs" type="Vector2">
</argument> </argument>
<description> <description>
Set the left and top limits in pixels for scrolling to begin. If the camera is outside of this limit the background will not continue to scroll. If an axis is greater than or equal to the corresponding axis of limit_end, then it will not limit scrolling for that axis.
</description> </description>
</method> </method>
<method name="get_limit_begin" qualifiers="const"> <method name="get_limit_begin" qualifiers="const">
<return type="Vector2"> <return type="Vector2">
</return> </return>
<description> <description>
Return the beginning limit.
</description> </description>
</method> </method>
<method name="set_limit_end"> <method name="set_limit_end">
<argument index="0" name="ofs" type="Vector2"> <argument index="0" name="ofs" type="Vector2">
</argument> </argument>
<description> <description>
Set the right and bottom limits in pixels for scrolling to end. If the camera is outside of this limit the background will not continue to scroll. If an axis is less than or equal to the corresponding axis of limit_begin, then it will not limit scrolling for that axis.
</description> </description>
</method> </method>
<method name="get_limit_end" qualifiers="const"> <method name="get_limit_end" qualifiers="const">
<return type="Vector2"> <return type="Vector2">
</return> </return>
<description> <description>
Return the ending limit.
</description> </description>
</method> </method>
<method name="set_ignore_camera_zoom"> <method name="set_ignore_camera_zoom">
<argument index="0" name="ignore" type="bool"> <argument index="0" name="ignore" type="bool">
</argument> </argument>
<description> <description>
Set to true for all child [ParallaxLayer] nodes to not be affected by the zoom level of the camera.
</description> </description>
</method> </method>
<method name="is_ignore_camera_zoom"> <method name="is_ignore_camera_zoom">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return ignoring camera zoom.
</description> </description>
</method> </method>
</methods> </methods>
@ -23623,32 +23659,38 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class> </class>
<class name="ParallaxLayer" inherits="Node2D" category="Core"> <class name="ParallaxLayer" inherits="Node2D" category="Core">
<brief_description> <brief_description>
A parallax scrolling layer to be used with [ParallaxBackground].
</brief_description> </brief_description>
<description> <description>
A ParallaxLayer must be the child of a [ParallaxBackground] node. All child nodes will be affected by the parallax scrolling of this layer.
</description> </description>
<methods> <methods>
<method name="set_motion_scale"> <method name="set_motion_scale">
<argument index="0" name="scale" type="Vector2"> <argument index="0" name="scale" type="Vector2">
</argument> </argument>
<description> <description>
Set the motion scale of the ParallaxLayer. If an axis is set to 0 then it will not move at all, it will stick with the camera.
</description> </description>
</method> </method>
<method name="get_motion_scale" qualifiers="const"> <method name="get_motion_scale" qualifiers="const">
<return type="Vector2"> <return type="Vector2">
</return> </return>
<description> <description>
Return the motion scale of the ParallaxLayer.
</description> </description>
</method> </method>
<method name="set_mirroring"> <method name="set_mirroring">
<argument index="0" name="mirror" type="Vector2"> <argument index="0" name="mirror" type="Vector2">
</argument> </argument>
<description> <description>
Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring.
</description> </description>
</method> </method>
<method name="get_mirroring" qualifiers="const"> <method name="get_mirroring" qualifiers="const">
<return type="Vector2"> <return type="Vector2">
</return> </return>
<description> <description>
Return the mirroring of the ParallaxLayer.
</description> </description>
</method> </method>
</methods> </methods>
@ -38129,8 +38171,10 @@ This method controls whether the position between two cached points is interpola
</class> </class>
<class name="TestCube" inherits="GeometryInstance" category="Core"> <class name="TestCube" inherits="GeometryInstance" category="Core">
<brief_description> <brief_description>
A simple cube used for testing in 3D.
</brief_description> </brief_description>
<description> <description>
The TestCube is a simple 2x2x2 cube with a basic texture. It can be used as a placeholder, to verify how the lighting looks, to test shaders, or any other task you may need a textured model to test with.
</description> </description>
<methods> <methods>
</methods> </methods>