Shuvit game release repo.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

scene_init.py 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import bge
  2. def main():
  3. import bge
  4. cont = bge.logic.getCurrentController()
  5. own = cont.owner
  6. dict = bge.logic.globalDict
  7. #print("nnnnnnpause level", dict['level'])
  8. own['last_stBut'] = False
  9. level = dict['level']
  10. scene = bge.logic.getCurrentScene()
  11. cam = scene.objects['Camera.003']
  12. print("scene innnnnnnnnnnnnit1")
  13. curscene = bge.logic.getCurrentScene()
  14. # scenes = bge.logic.getSceneList()
  15. # for scene in scenes :
  16. # if scene.name == 'main':
  17. # player = scene.objects['player']
  18. # main = bge.logic.getSceneList["main"]
  19. dict['overlay_fadeout'] = 1
  20. scenes = bge.logic.getSceneList()
  21. own['pre_pause_linvel'] = 0.0
  22. #own['last_roll_frame'] = 0
  23. for i in scenes:
  24. if i.name == "main":
  25. main = i
  26. for i in scenes:
  27. if i.name == "fade_out":
  28. print('ending fade_out', scenes)
  29. scene2 = i
  30. scene2.end()
  31. if level == 'newday':
  32. brightness = 2.6
  33. cam['BC_BRIGHTNESS'] = 1.3
  34. cam['BC_CONTRAST'] = 1.5
  35. elif level == 'lot':
  36. brightness = 2.6
  37. cam['BC_BRIGHTNESS'] = 1
  38. cam['BC_CONTRAST'] = 1
  39. #main.world.zenithColor = [1.0, .9, .975, 0]
  40. #main.world.horizonColor = [.42, .555, .823, 0]
  41. curscene.world.zenithColor = [1.0, .9, .975, 0]
  42. curscene.world.horizonColor = [.42, .555, .823, 0]
  43. print("sadfasdfsdfasdfasdfasdfasdfasdf")
  44. elif level == 'spine':
  45. brightness = 2.6
  46. cam['BC_BRIGHTNESS'] = .85
  47. cam['BC_CONTRAST'] = 1.1
  48. elif level == 'garage18':
  49. print('setting color of', curscene)
  50. curscene.world.zenithColor = [0, 0.0, 0.0, 0]
  51. curscene.world.horizonColor = [0, 0, 0.0, 0]
  52. #main.mistEnable = True
  53. #main.mistIntensity = .9
  54. #main.mistStart = 1
  55. #main.mistDistance = 5
  56. else:
  57. cam['BC_BRIGHTNESS'] = 1.0
  58. cam['BC_CONTRAST'] = 1.0
  59. main.world.zenithColor = [1.0, .9, .975, 0]
  60. main.world.horizonColor = [.42, .555, .823, 0]
  61. #main.mistEnable = False
  62. main()