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__)

14
targets/BankTarget.py Normal file
View File

@@ -0,0 +1,14 @@
from targets.Target import Target
class BankTarget(Target):
def __init__(self, points):
super(points)
self.is_hit = False
def hit(self):
self.is_hit = True
super.hit()
#notify Bank
def reset(self):
self.is_hit = False

View File

@@ -0,0 +1,8 @@
from targets.Target import Target
class ReboundContactTarget(Target):
def __init__(self):
super(100, 'Rebound Contact')
def hit(self):
super.hit()

13
targets/Target.py Normal file
View File

@@ -0,0 +1,13 @@
from observable import Observable
class Target(Observable):
def __init__(self, points, name):
self.points = points
self.name = name
self.hit_key = "hit"
def hit(self):
#notify Observers
#notify Gamestate
self.trigger(self.hit_key, self)

17
targets/__init__.py Normal file
View File

@@ -0,0 +1,17 @@
__all__ = []
import pkgutil
import inspect
__path__ = pkgutil.extend_path(__path__, __name__)
for loader, name, is_pkg in pkgutil.walk_packages(__path__):
module = loader.find_module(name).load_module(name)
for name, value in inspect.getmembers(module):
if name.startswith('__'):
continue
globals()[name] = value
__all__.append(name)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,8 @@
from targets.Target import Target
class LeftInlaneTarget(Target):
def __init__(self):
super(100, 'Left Inlane')
def hit(self):
super.hit()

View File

@@ -0,0 +1,8 @@
from targets.Target import Target
class LeftOutlaneTarget(Target):
def __init__(self):
super(100, 'Left Outlane')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class RightInlaneTarget(Target):
def __init__(self):
super()
def hit(self):
super.hit()

View File

@@ -0,0 +1,10 @@
from targets.Target import Target
class RightOutlaneKickerTarget(Target):
def __init__(self):
super(10000, "Right Outlane Kicker")
#Scores 30000, 50000 when lit and advances 1-2-3-4-5 sequence
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class RightOutlaneTarget(Target):
def __init__(self):
super(50000, "Right Outlane")
def hit(self):
super.hit()

View File

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class CanalButtonTopTarget(Target):
def __init__(self):
super(20000, "Canal Button Bottom")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class LeftLaneButton4Target(Target):
def __init__(self):
super(20000, "Canal Button Middle Bottom")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class LeftLaneButton3Target(Target):
def __init__(self):
super(20000, "Canal Button Middle")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class LeftLaneButton2Target(Target):
def __init__(self):
super(20000, "Canal Button Middle Top")
def hit(self):
super.hit()

View File

@@ -0,0 +1,8 @@
from targets.Target import Target
class LeftLaneButton1Target(Target):
def __init__(self):
super(100, 'Left Lane Button #1')
def hit(self):
super.hit()

View File

Binary file not shown.

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class FixedTarget1(Target):
def __init__(self):
super(0, "Fixed Target 1")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class FixedTarget2(Target):
def __init__(self):
super(0, "Fixed Target 2")
def hit(self):
super.hit()

View File

@@ -0,0 +1,8 @@
from targets.Target import Target
class FixedTarget3(Target):
def __init__(self):
super(100, 'Fixed Target 3')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class FixedTarget4(Target):
def __init__(self):
super(100, 'Fixed Target 4')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class FixedTarget5(Target):
def __init__(self):
super(100, 'Fixed Target 5')
def hit(self):
super.hit()

View File

View File

@@ -0,0 +1,9 @@
from targets.BankTarget import BankTarget
class LeftBankLeft(BankTarget):
def __init__(self):
super(100, 'Left Bank Left')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.BankTarget import BankTarget
class LeftBankMiddleLeft(BankTarget):
def __init__(self):
super(100, 'Left Bank Middle Left')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.BankTarget import BankTarget
class LeftBankMiddleRight(BankTarget):
def __init__(self):
super(100, 'Left Bank Middle Right')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class LeftBankLeft(Target):
def __init__(self):
super(100, 'Left Bank Right')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Bank import Bank
class LeftBankTarget(Bank):
def __init__(self):
super()
def hit(self):
super.hit()

View File

Binary file not shown.

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class LeftPopTarget(Target):
def __init__(self):
super(0, "Left Pop")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class RightPopTarget(Target):
def __init__(self):
super(100, 'Right Pop')
def hit(self):
super.hit()

View File

View File

@@ -0,0 +1,12 @@
from targets.Bank import Bank
from targets.right_bank import RightBankLeft
from targets.right_bank import RightBankMiddle
from targets.right_bank import RightBankRight
class RightBank(Bank):
def __init__(self):
targets = [RightBankLeft(), RightBankMiddle(), RightBankRight]
super(0, "Right Bank", targets)
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.BankTarget import BankTarget
class RightBankLeft(BankTarget):
def __init__(self):
super(100, "Right Bank Left")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.BankTarget import BankTarget
class MiddleDropTarget(BankTarget):
def __init__(self):
super(100, 'Right Bank Middle')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.BankTarget import BankTarget
class RightBankRight(BankTarget):
def __init__(self):
super(100, "Right Bank Right")
def hit(self):
super.hit()

View File

Binary file not shown.

View File

@@ -0,0 +1,8 @@
from targets.Target import Target
class LeftSlingshotTarget(Target):
def __init__(self):
super(100, 'Left Slingshot')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class RightSlingshotTarget(Target):
def __init__(self):
super(10, "Right Slingshot")
def hit(self):
super.hit()

View File

Binary file not shown.

View File

@@ -0,0 +1,12 @@
from targets.Target import Target
# A standup target. When lit, it scores the Orange Special (operator
# adjustable) for Nothing, Extra Ball, Replay, Super Bonus, or 300,000
# points. Scores 100,000 points when not lit.
class FixedSpecialOrangeTarget(Target):
def __init__(self):
super(100000, "Special Orange")
def hit(self):
super.hit()

View File

@@ -0,0 +1,12 @@
from targets.Target import Target
# A standup target. When lit, it scores the Red Special (operator
# adjustable) for Nothing, Extra Ball, Replay, Super Bonus, or 1,000,000
# points. Scores 10,000 points when not lit.
class FixedSpecialRedTarget(Target):
def __init__(self):
super(10000, "Special Red")
def hit(self):
super.hit()

View File

@@ -0,0 +1,8 @@
from targets.Target import Target
class SpinnerTarget(Target):
def __init__(self):
super(100, 'Spinner')
def hit(self):
super.hit()

View File

Binary file not shown.

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class CreditTarget(Target):
def __init__(self):
super(0, 'Credit')
def hit(self):
super.hit()

View File

@@ -0,0 +1,8 @@
from targets.Target import Target
class OutholeTarget(Target):
def __init__(self):
super(100, 'Outhole')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.Target import Target
class RisingBall(Target):
def __init__(self):
super(0, "Rising Ball")
def hit(self):
super.hit()

View File

Binary file not shown.

View File

@@ -0,0 +1,9 @@
from Target import Target
class TopBank(Target):
def __init__(self):
super()
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.BankTarget import BankTarget
class TopBankLeft(BankTarget):
def __init__(self):
super(100, 'Top Bank Left')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.BankTarget import BankTarget
class TopBankMiddle(BankTarget):
def __init__(self):
super(100, "Top Bank Middle")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from targets.BankTarget import BankTarget
class TopBankMiddleLeft(BankTarget):
def __init__(self):
super(100, "Top Bank Middle Left")
def hit(self):
super.hit()

Some files were not shown because too many files have changed in this diff Show More