MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / end

Function end

tools/streamer_recorder/blender_viewer/scripts/main.py:126–142  ·  view source on GitHub ↗

called when ending BGE (e.g. to properly close network connections)

(controller)

Source from the content-addressed store, hash-verified

124 pass
125
126def end(controller):
127 """
128 called when ending BGE (e.g. to properly close network connections)
129 """
130 if controller.sensors[0].positive:
131
132 # close socket
133 logic.socket.close()
134 controller.owner['SocketConnected'] = False
135 controller.owner['End'] = True
136 print('close socket')
137
138 # close cv2 window
139 cv2.destroyAllWindows()
140
141 # end game engine
142 logic.endGame()

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected