You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
514 B
17 lines
514 B
|
|
import pygame as pg
|
|
from .. import constants as c
|
|
|
|
class Collider(pg.sprite.Sprite):
|
|
"""Invisible sprites placed overtop background parts
|
|
that can be collided with (pipes, steps, ground, etc."""
|
|
def __init__(self, x, y, width, height, name='collider'):
|
|
pg.sprite.Sprite.__init__(self)
|
|
self.image = pg.Surface((width, height)).convert()
|
|
#self.image.fill(c.RED)
|
|
self.rect = self.image.get_rect()
|
|
self.rect.x = x
|
|
self.rect.y = y
|
|
self.state = None
|
|
|