Example #1
0
 def __init__(self, ID, Type, name, attack, damageType, effect, description, dialog, cost):
     '''
     Constructor
     @param cost: cout en mana de la carte
     '''
     Entity.__init__(self, ID, Type, name, attack, damageType, effect, description, dialog)
     self.cost = int(cost)
 def __init__(self, ID, Type, name, attack, damageType, effect, description, dialog, health):
     '''
     Constructor
     @param health: Les points de vie
     @param attack: Degats
     '''
     Entity.__init__(self, ID, Type, name, attack, damageType, effect, description, dialog)
     self.health = int(health)
     self.action = False
Example #3
0
def get_contacts(ball: Entity, static_bodies: [Entity]):
    result = []
    for static in static_bodies:
        if ball.collide(static):
            result.append(Contact(ball, static))
    return result