예제 #1
0
 def __init__(self, entity_id):
     Entity.__init__(self, entity_id)
     self.x = p.IntProperty(urn.x_urn)
     self.y = p.IntProperty(urn.y_urn)
     self.edges = p.EdgeListProperty(urn.edges_urn)
     self.blockades = p.EntityIDListProperty(urn.blockades_urn)
     self.register_properties([self.x, self.y, self.edges, self.blockades])
     self.apexes = None
예제 #2
0
 def __init__(self, entity_id):
     Entity.__init__(self, entity_id)
     self.x = p.IntProperty(urn.x_urn)
     self.y = p.IntProperty(urn.y_urn)
     self.position = p.EntityIDProperty(urn.position_urn)
     self.apexes = p.IntArrayProperty(urn.apexes_urn)
     self.repair_cost = p.IntProperty(urn.repair_cost_urn)
     self.register_properties([self.x, self.y, self.position, self.apexes, self.repair_cost])
예제 #3
0
 def __init__(self, entity_id):
     Entity.__init__(self, entity_id)
     self.start_time = p.IntProperty(urn.start_time_urn)
     self.longitude = p.IntProperty(urn.longitude_urn)
     self.latitude = p.IntProperty(urn.latitude_urn)
     self.wind_force = p.IntProperty(urn.wind_force_urn)
     self.wind_direction = p.IntProperty(urn.wind_direction_urn)
     self.register_properties([self.start_time, self.longitude, self.latitude, self.wind_force, self.wind_direction])
예제 #4
0
 def __init__(self, entity_id):
     Area.__init__(self, entity_id)
     self.floors = p.IntProperty(urn.floors_urn)
     self.ignition = p.IntProperty(urn.ignition_urn)
     self.fieryness = p.IntProperty(urn.fieryness_urn)
     self.brokenness = p.IntProperty(urn.brokenness_urn)
     self.building_code = p.IntProperty(urn.building_code_urn)
     self.attributes = p.IntProperty(urn.building_attributes_urn)
     self.ground_area = p.IntProperty(urn.ground_area_urn)
     self.total_area = p.IntProperty(urn.total_area_urn)
     self.temperature = p.IntProperty(urn.temperature_urn)
     self.importance = p.IntProperty(urn.importance_urn)
     self.register_properties([self.floors, self.ignition, self.fieryness, self.brokenness, self.building_code])
     self.register_properties([self.attributes, self.ground_area, self.total_area, self.temperature, self.importance])
예제 #5
0
 def __init__(self, entity_id):
     Entity.__init__(self, entity_id)
     self.x = p.IntProperty(urn.x_urn)
     self.y = p.IntProperty(urn.y_urn)
     self.travel_distance = p.IntProperty(urn.travel_distance_urn)
     self.position = p.EntityIDProperty(urn.position_urn)
     self.position_history = p.IntArrayProperty(urn.position_history_urn)
     self.direction = p.IntProperty(urn.direction_urn)
     self.stamina = p.IntProperty(urn.stamina_urn)
     self.hp = p.IntProperty(urn.hp_urn)
     self.damage = p.IntProperty(urn.damage_urn)
     self.buriedness = p.IntProperty(urn.buriedness_urn)
     self.register_properties([self.x, self.y, self.travel_distance, self.position, self.position_history])
     self.register_properties([self.direction, self.stamina, self.hp, self.damage, self.buriedness])
예제 #6
0
def create_property(urn, byte_array):
    prop = None
    if urn in int_property_types:
        prop = p.IntProperty(urn)
        prop.read(ds.InputStream(byte_array))
    elif urn in int_list_property_types:
        prop = p.IntArrayProperty(urn)
        prop.read(ds.InputStream(byte_array))
    elif urn in entityid_property_types:
        prop = p.EntityIDProperty(urn)
        prop.read(ds.InputStream(byte_array))
    elif urn in entityid_list_property_types:
        prop = p.EntityIDListProperty(urn)
        prop.read(ds.InputStream(byte_array))
    elif urn in edgelist_property_types:
        prop = p.EdgeListProperty(urn)
        prop.read(ds.InputStream(byte_array))

    if prop is None:
        print 'prop:' + urn + ' is None'

    return prop
예제 #7
0
 def __init__(self, entity_id):
     Human.__init__(self, entity_id)
     self.water = p.IntProperty(urn.water_urn)
     self.register_properties([self.water])