コード例 #1
0
  if inFlag and abs(man.z() - building.zpos) > 55:
    inFlag = False
    for b in building.model:
      b.set_light(outLight, 0)
    mymap.set_light(outLight, 0)

  if inputs.key_state("KEY_APOSTROPHE"):  #key '
    tilt -= 2.0
  if inputs.key_state("KEY_SLASH"):  #key /
    tilt += 2.0
  if inputs.key_state("KEY_A"):  #key A
    rot += 2
  if inputs.key_state("KEY_D"): #key D
    rot -= 2
  if inputs.key_state("KEY_P"): #key P
    #record = not(record)
    while inputs.key_state("KEY_P"):
    	inputs.do_input_events()		# wait for key to go up
    screenshot("silo"+str(scshots)+".jpg")
    scshots += 1
  if inputs.key_state("KEY_ENTER"):  #key RETURN
    mc = 0
  if inputs.key_state("KEY_X"):  #key RETURN
    while inputs.key_state("KEY_X"):
      inputs.do_input_events() # wait for key to go up
    mouseOn != mouseOn
    inputs.grab_by_type("keyboard", grab=mouseOn)

inputs.release()
DISPLAY.destroy()