예제 #1
0
def update(dt):
    damaged = enemies.intersection(bullet_ai.hit)
    for entity_id in damaged:
        damage = bullet_ai.hit_data[entity_id]
        health.apply_damage(entity_id, damage)

    damaged = enemies.intersection(missile_ai.hit)
    for entity_id in damaged:
        damage = missile_ai.hit_data[entity_id]
        health.apply_damage(entity_id, damage * MISSILE_DAMAGE_MULT)

    global press_trigger
    for entity_id in press_trigger:
        trigger.hold(entity_id)
    press_trigger = []