예제 #1
0
파일: starter.py 프로젝트: johnyu916/waffle
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
파일: starter.py 프로젝트: johnyu916/pacman
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