15 lines
457 B
Python
15 lines
457 B
Python
|
class CollisionDirection:
|
||
|
LEFT = 0
|
||
|
RIGHT = 1
|
||
|
TOP = 2
|
||
|
BOTTOM = 3
|
||
|
DIRECTION_NAMES = ['LEFT', 'RIGHT', 'TOP', 'BOTTOM']
|
||
|
|
||
|
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]
|