2023-03-26 17:01:28 +02:00
|
|
|
class CollisionDirection:
|
|
|
|
LEFT = 0
|
|
|
|
RIGHT = 1
|
|
|
|
TOP = 2
|
|
|
|
BOTTOM = 3
|
2023-03-27 14:38:52 +02:00
|
|
|
INSIDE = 4
|
|
|
|
DIRECTION_NAMES = ['LEFT', 'RIGHT', 'TOP', 'BOTTOM', 'INSIDE']
|
2023-03-26 17:01:28 +02:00
|
|
|
|
|
|
|
def __init__(self, direction: int, primary_sprite, secondary_sprite):
|
|
|
|
self.direction = direction
|
|
|
|
self.primary_sprite = primary_sprite
|
|
|
|
self.secondary_sprite = secondary_sprite
|
|
|
|
|
|
|
|
def to_string(self):
|
|
|
|
return 'CollisionDirection.' + CollisionDirection.DIRECTION_NAMES[self.direction]
|