示例#1
0
def thing_move_read(state):
    thing = {}
    text = None
    with open("/".join([state["things_dir"], state["thing_name"]])) as f:
        text = f.read()
    map = json.loads(text)
    geometry = state["geometries"][map["geometry_name"]]
    thing = thing_new(new_id(state), "Object", map["position"], map["rotates"], [], geometry, map["bounds"])
    return thing
示例#2
0
def thing_move_read(state):
    thing = {}
    text = None
    with open("/".join([state["things_dir"], state["thing_name"]])) as f:
        text = f.read()
    map = json.loads(text)
    geometry = state["geometries"][map["geometry_name"]]
    thing = thing_new(new_id(state), "Object", map["position"], map["rotates"],
                      [], geometry, map["bounds"])
    return thing
示例#3
0
文件: world.py 项目: johnyu916/pacman
def new_world(state):
    world = {}
    world = thing_new(new_id(state), "World", [0.0, 0.0, 0.0], [], [], None)
    return world
示例#4
0
文件: world.py 项目: johnyu916/waffle
def new_world(state):
    world = {}
    world = thing_new(new_id(state), "World", [0.0, 0.0, 0.0], [], [], None)
    return world