thiiiiings

This commit is contained in:
Jonas Zeunert
2020-02-13 19:05:55 +01:00
parent 82f1ad6ed8
commit 7414734dad
719 changed files with 41551 additions and 227 deletions

24
targets/Bank.py Normal file
View File

@@ -0,0 +1,24 @@
from targets.Target import Target
class Bank(Target):
def __init__(self, points, name, targets):
super(points, name)
self.targets = targets
self.__register_targets__()
def __target_hit__(self, target):
if all(target.is_hit for target in self.targets):
self.__all_targets_hit__()
def __all_targets_hit__(self):
self.__reset_all_targets__()
super.hit()
pass
def __reset_all_targets__(self):
for target in self.targets:
target.reset()
def __register_targets__(self):
for target in self.targets:
target.on(target.hit_key, self.__target_hit__)