Make creating games with 2D sprites more easy and clean.
Class that represents a moveable 2D image.
Parameters: |
|
---|
The x-coordinate, in pixels, of the center of this sprite.
The y-coordinate, in pixels, of the center of this sprite.
The name of the image to draw, when drawing this sprite.
The width of this Sprite, when drawn.
The height of this Sprite, when drawn.
Moves this Sprite so that it does not overlap with another Sprite.
Parameters: | other_sprite (Sprite) – Another Sprite object. |
---|
Moves this sprite the minimum amount so that it is not overlapping with other_sprite. If there is no overlap, it does nothing.
Returns whether this Sprite is colliding with another Sprite.
Parameters: | other_sprite (Sprite) – Another Sprite object. |
---|---|
Returns: | (bool) – Returns True if this sprite is overlapping with other_sprite and False otherwise. |