Add Timeouts
14
Timeouts.md
Normal file
14
Timeouts.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Timeouts
|
||||||
|
|
||||||
|
The timeout function is built into `gameUtils.Game` and is therefor accessible just by calling the following within your game:
|
||||||
|
```python
|
||||||
|
self.timeout(timeoutID, delay)
|
||||||
|
```
|
||||||
|
|
||||||
|
## To use the events:
|
||||||
|
```python
|
||||||
|
# The onEvent function in your Game object
|
||||||
|
def onEvent(self, event):
|
||||||
|
if event.type == gameUtils.Timeout:
|
||||||
|
print(f'Timeout {event.timeoutID} just fired.')
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user