import bge def main(): import bge cont = bge.logic.getCurrentController() own = cont.owner dict = bge.logic.globalDict #print("nnnnnnpause level", dict['level']) own['last_stBut'] = False level = dict['level'] scene = bge.logic.getCurrentScene() cam = scene.objects['Camera.003'] curscene = bge.logic.getCurrentScene() # scenes = bge.logic.getSceneList() # for scene in scenes : # if scene.name == 'main': # player = scene.objects['player'] # main = bge.logic.getSceneList["main"] dict['overlay_fadeout'] = 1 scenes = bge.logic.getSceneList() own['pre_pause_linvel'] = 0.0 #own['last_roll_frame'] = 0 for i in scenes: if i.name == "main": main = i for i in scenes: if i.name == "fade_out": print('ending fade_out', scenes) scene2 = i scene2.end() if level == 'newday': brightness = 2.6 cam['BC_BRIGHTNESS'] = 1.3 cam['BC_CONTRAST'] = 1.5 elif level == 'lot': brightness = 2.6 cam['BC_BRIGHTNESS'] = 1 cam['BC_CONTRAST'] = 1 #main.world.zenithColor = [1.0, .9, .975, 0] #main.world.horizonColor = [.42, .555, .823, 0] curscene.world.zenithColor = [1.0, .9, .975, 0] curscene.world.horizonColor = [.42, .555, .823, 0] print("sadfasdfsdfasdfasdfasdfasdfasdf") elif level == 'spine': brightness = 2.6 cam['BC_BRIGHTNESS'] = .85 cam['BC_CONTRAST'] = 1.1 elif level == 'garage18': print('setting color of', curscene) curscene.world.zenithColor = [0, 0.0, 0.0, 0] curscene.world.horizonColor = [0, 0, 0.0, 0] #main.mistEnable = True #main.mistIntensity = .9 #main.mistStart = 1 #main.mistDistance = 5 elif level == 'pats': print('setting color of', curscene) #main.world.zenithColor = [1.0, .9, .975, 0] #main.world.horizonColor = [.42, .555, .823, 0] #cam['BC_BRIGHTNESS'] = 1.35 #cam['BC_CONTRAST'] = 1.3 #cam['avgL'] = .6 #cam['HDRamount'] = .45 #main.mistEnable = True #main.mistIntensity = .9 #main.mistStart = 1 #main.mistDistance = 5 elif level == 'j_scene': print('setting color of', curscene) main.world.zenithColor = [1.0, .9, .975, 0] main.world.horizonColor = [.42, .555, .823, 0] cam['BC_BRIGHTNESS'] = 1.35 cam['BC_CONTRAST'] = 1.3 cam['avgL'] = .6 cam['HDRamount'] = .45 #main.mistEnable = True #main.mistIntensity = .9 #main.mistStart = 1 #main.mistDistance = 5 else: cam['BC_BRIGHTNESS'] = dict['BC_BRIGHTNESS'] cam['BC_CONTRAST'] = dict['BC_CONTRAST'] cam['bc'] = dict['bc'] main.world.zenithColor = [1.0, .9, .975, 0] main.world.horizonColor = [.42, .555, .823, 0] #main.mistEnable = False if dict['bc'] == 1: cont.activate(cam.actuators["bc"]) else: cont.activate(cam.actuators["bc_off"]) if dict['hdr'] == 1: cont.activate(cam.actuators["hdr"]) else: cont.activate(cam.actuators["hdr_off"]) if dict['ao'] == 1: cont.activate(cam.actuators["ao"]) else: cont.activate(cam.actuators["ao_off"]) if dict['dof_on'] == 1: cont.activate(cam.actuators["DOF"]) else: cont.activate(cam.actuators["DOF_off"]) scene.world.envLightEnergy = dict['ambient_strength'] cam['BC_BRIGHTNESS'] = dict['BC_BRIGHTNESS'] cam['BC_CONTRAST'] = dict['BC_CONTRAST'] cam['bc'] = dict['bc'] cam['hdr'] = dict['hdr'] cam['avgL'] = dict['avgL'] cam['HDRamount'] = dict['HDRamount'] cam['ao'] = dict['ao'] cam['onlyAO'] = dict['onlyAO'] cam['aowidth'] = dict['aowidth'] cam['aoradius'] = dict['aoradius'] cam['ambient_strength'] = dict['ambient_strength'] cam['sun_strength'] = dict['sun_strength'] cam['sun_pos_x'] = dict['sun_rot_x'] cam['sun_pos_y'] = dict['sun_rot_y'] cam['shadow_on'] = dict['shadow_on'] main()