Skip to content

Fix docs and typos for PymunkPhysicsEngine.add_sprite and PymunkPhysicsEngine.add_sprite_list respectively #1642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions arcade/pymunk_physics_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,21 @@ def add_sprite(self,
):
""" Add a sprite to the physics engine.

:param sprite: The sprite to add
:param mass: The mass of the object. Defaults to 1
:param friction: The friction the object has. Defaults to 0.2
:param sprite: The sprite to add.
:param mass: The mass of the object. Defaults to 1.
:param friction: The friction the object has. Defaults to 0.2.
:param elasticity: How bouncy this object is. 0 is no bounce. Values of 1.0 and higher may behave badly.
:param moment_of_inertia: The moment of inertia, or force needed to change angular momentum. \
Providing infinite makes this object stuck in its rotation.
:param body_type: The type of the body. Defaults to Dynamic, meaning, the body can move, rotate etc. \
Providing STATIC makes it fixed to the world.
:param damping: See class docs
:param gravity: See class docs
:param damping: See class docs.
:param gravity: See class docs.
:param max_velocity: The maximum velocity of the object.
:param max_horizontal_velocity: maximum velocity on the x axis
:param max_vertical_velocity: maximum velocity on the y axis
:param radius:
:param collision_type:
:param max_horizontal_velocity: Maximum velocity on the x axis in pixels.
:param max_vertical_velocity: Maximum velocity on the y axis in pixels.
:param radius: Radius for the shape created for the sprite in pixels.
:param collision_type: Assign a name to the sprite, use this name when adding collision handler.
"""

if damping is not None:
Expand Down Expand Up @@ -205,7 +205,7 @@ def add_sprite_list(self,
mass: float = 1,
friction: float = 0.2,
elasticity: Optional[float] = None,
moment_of_intertia: Optional[float] = None,
moment_of_inertia: Optional[float] = None,
body_type: int = DYNAMIC,
damping: Optional[float] = None,
collision_type: Optional[str] = None
Expand All @@ -217,7 +217,7 @@ def add_sprite_list(self,
mass=mass,
friction=friction,
elasticity=elasticity,
moment_of_inertia=moment_of_intertia,
moment_of_inertia=moment_of_inertia,
body_type=body_type,
damping=damping,
collision_type=collision_type)
Expand Down