This repository has been archived on 2026-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
Files
GameUtils/src/gameUtils/events.py
2025-06-21 23:03:11 +01:00

36 lines
1.0 KiB
Python

import time
class _event:
def __init__(self):
self.type = self.__class__
class AnimStart(_event):
def __init__(self, objectID, animationID):
super().__init__()
self.objectID = objectID
self.animationID = animationID
def __repr__(self):
return f'<AnimFinish | {self.objectID=} | {self.animationID=}>'
class AnimFinish(_event):
def __init__(self, objectID, animationID):
super().__init__()
self.objectID = objectID
self.animationID = animationID
def __repr__(self):
return f'<AnimFinish | {self.objectID=} | {self.animationID=}>'
class Timeout(_event):
def __init__(self, timeoutID, fireOn):
super().__init__()
# The timeout ID specified by the user
self.timeoutID = timeoutID
# When the event should be fired
self.fireOn = fireOn
# When it was created
self.created = time.perf_counter()
def __repr__(self):
return f'<Timeout | {self.timeoutID=} | {self.fireOn=} | {self.created=}>'