animation Function
Defined in pyglet.resource
-
animation(self, name, flip_x=False, flip_y=False, rotate=0)
Load an animation with optional transformation.
Animations loaded from the same source but with different
transformations will use the same textures.
Parameters: |
- name (str) – Filename of the animation source to load.
- flip_x (bool) – If True, the returned image will be flipped horizontally.
- flip_y (bool) – If True, the returned image will be flipped vertically.
- rotate (int) – The returned image will be rotated clockwise by the given
number of degrees (a multiple of 90).
|
Return type: | Animation
|