restructured targets

This commit is contained in:
Jonas Zeunert
2020-02-11 15:38:46 +01:00
parent 53d55d16f5
commit 82f1ad6ed8
91 changed files with 289 additions and 206 deletions

17
src/InputHandler.py Normal file
View File

@@ -0,0 +1,17 @@
import asyncio
from src.networking.Networking import Networking
class EventHandler:
def __init__(self, targets):
self.isRunning = True
self.targets = targets
async def handleEvents(self):
self.isRunning = True
while(self.isRunning):
event = Networking.getInputEvent()
self.targets[event].hit()
def stop(self):
self.isRunning = False