@@ -147,7 +147,7 @@ def _set_projection_matrix(self, *, update_combined_matrix: bool = True) -> None
147
147
"""
148
148
Helper method. This will just pre-compute the projection and combined matrix
149
149
150
- :param bool update_combined_matrix: if True will also update the combined matrix (projection @ view)
150
+ :param update_combined_matrix: if True will also update the combined matrix (projection @ view)
151
151
"""
152
152
self ._projection_matrix = Mat4 .orthogonal_projection (* self ._projection , - 100 , 100 )
153
153
if update_combined_matrix :
@@ -157,7 +157,7 @@ def _set_view_matrix(self, *, update_combined_matrix: bool = True) -> None:
157
157
"""
158
158
Helper method. This will just pre-compute the view and combined matrix
159
159
160
- :param bool update_combined_matrix: if True will also update the combined matrix (projection @ view)
160
+ :param update_combined_matrix: if True will also update the combined matrix (projection @ view)
161
161
"""
162
162
163
163
# Figure out our 'real' position
@@ -181,8 +181,8 @@ def move_to(self, vector: Union[Vec2, tuple], speed: float = 1.0) -> None:
181
181
The camera will lerp towards this position based on the provided speed,
182
182
updating its position every time the use() function is called.
183
183
184
- :param Vec2 vector: Vector to move the camera towards.
185
- :param Vec2 speed: How fast to move the camera, 1.0 is instant, 0.1 moves slowly
184
+ :param vector: Vector to move the camera towards.
185
+ :param speed: How fast to move the camera, 1.0 is instant, 0.1 moves slowly
186
186
"""
187
187
self .goal_position = Vec2 (* vector )
188
188
self .move_speed = speed
@@ -221,7 +221,7 @@ def get_map_coordinates(self, camera_vector: Union[Vec2, tuple]) -> Vec2:
221
221
"""
222
222
Returns map coordinates in pixels from screen coordinates based on the camera position
223
223
224
- :param Vec2 camera_vector: Vector captured from the camera viewport
224
+ :param camera_vector: Vector captured from the camera viewport
225
225
"""
226
226
return Vec2 (* self .position ) + Vec2 (* camera_vector )
227
227
@@ -230,9 +230,9 @@ def resize(self, viewport_width: int, viewport_height: int, *,
230
230
"""
231
231
Resize the camera's viewport. Call this when the window resizes.
232
232
233
- :param int viewport_width: Width of the viewport
234
- :param int viewport_height: Height of the viewport
235
- :param bool resize_projection: if True the projection will also be resized
233
+ :param viewport_width: Width of the viewport
234
+ :param viewport_height: Height of the viewport
235
+ :param resize_projection: if True the projection will also be resized
236
236
"""
237
237
new_viewport = (self ._viewport [0 ], self ._viewport [1 ], viewport_width , viewport_height )
238
238
self .set_viewport (new_viewport )
@@ -272,12 +272,12 @@ class Camera(SimpleCamera):
272
272
It is very useful for separating a scrolling screen of sprites, and a GUI overlay.
273
273
For an example of this in action, see :ref:`sprite_move_scrolling`.
274
274
275
- :param tuple viewport: (left, bottom, width, height) size of the viewport. If None the window size will be used.
276
- :param tuple projection: (left, right, bottom, top) size of the projection. If None the window size will be used.
277
- :param float zoom: the zoom to apply to the projection
278
- :param float rotation: the angle in degrees to rotate the projection
279
- :param tuple anchor: the x, y point where the camera rotation will anchor. Default is the center of the viewport.
280
- :param Window window: Window to associate with this camera, if working with a multi-window program.
275
+ :param viewport: (left, bottom, width, height) size of the viewport. If None the window size will be used.
276
+ :param projection: (left, right, bottom, top) size of the projection. If None the window size will be used.
277
+ :param zoom: the zoom to apply to the projection
278
+ :param rotation: the angle in degrees to rotate the projection
279
+ :param anchor: the x, y point where the camera rotation will anchor. Default is the center of the viewport.
280
+ :param window: Window to associate with this camera, if working with a multi-window program.
281
281
"""
282
282
def __init__ (
283
283
self , * ,
@@ -331,7 +331,7 @@ def _set_projection_matrix(self, *, update_combined_matrix: bool = True) -> None
331
331
"""
332
332
Helper method. This will just pre-compute the projection and combined matrix
333
333
334
- :param bool update_combined_matrix: if True will also update the combined matrix (projection @ view)
334
+ :param update_combined_matrix: if True will also update the combined matrix (projection @ view)
335
335
"""
336
336
# apply zoom
337
337
left , right , bottom , top = self ._projection
@@ -347,7 +347,7 @@ def _set_projection_matrix(self, *, update_combined_matrix: bool = True) -> None
347
347
def _set_view_matrix (self , * , update_combined_matrix : bool = True ) -> None :
348
348
"""
349
349
Helper method. This will just pre-compute the view and combined matrix
350
- :param bool update_combined_matrix: if True will also update the combined matrix (projection @ view)
350
+ :param update_combined_matrix: if True will also update the combined matrix (projection @ view)
351
351
"""
352
352
353
353
# Figure out our 'real' position plus the shake
@@ -540,9 +540,9 @@ def shake(self, velocity: Union[Vec2, tuple], speed: float = 1.5, damping: float
540
540
"""
541
541
Add a camera shake.
542
542
543
- :param Vec2 velocity: Vector to start moving the camera
544
- :param float speed: How fast to shake
545
- :param float damping: How fast to stop shaking
543
+ :param velocity: Vector to start moving the camera
544
+ :param speed: How fast to shake
545
+ :param damping: How fast to stop shaking
546
546
"""
547
547
if not isinstance (velocity , Vec2 ):
548
548
velocity = Vec2 (* velocity )
@@ -568,10 +568,9 @@ def get_sprites_at_point(self, point: "Point", sprite_list: "SpriteList") -> Lis
568
568
the specified point. If a sprite has a different center_x/center_y but touches the point,
569
569
this will return that sprite.
570
570
571
- :param Point point: Point to check
572
- :param SpriteList sprite_list: SpriteList to check against
571
+ :param point: Point to check
572
+ :param sprite_list: SpriteList to check against
573
573
574
574
:returns: List of sprites colliding, or an empty list.
575
- :rtype: list
576
575
"""
577
576
raise NotImplementedError ()
0 commit comments