Shuvit game master repo. http://shuvit.org
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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. for i in scenes:
  23. if i.name == "main":
  24. main = i
  25. for i in scenes:
  26. if i.name == "fade_out":
  27. print('ending fade_out', scenes)
  28. scene2 = i
  29. scene2.end()
  30. if level == 'newday':
  31. brightness = 2.6
  32. cam['BC_BRIGHTNESS'] = 1.3
  33. cam['BC_CONTRAST'] = 1.5
  34. elif level == 'lot':
  35. brightness = 2.6
  36. cam['BC_BRIGHTNESS'] = 1
  37. cam['BC_CONTRAST'] = 1
  38. #main.world.zenithColor = [1.0, .9, .975, 0]
  39. #main.world.horizonColor = [.42, .555, .823, 0]
  40. curscene.world.zenithColor = [1.0, .9, .975, 0]
  41. curscene.world.horizonColor = [.42, .555, .823, 0]
  42. print("sadfasdfsdfasdfasdfasdfasdfasdf")
  43. elif level == 'spine':
  44. brightness = 2.6
  45. cam['BC_BRIGHTNESS'] = .85
  46. cam['BC_CONTRAST'] = 1.1
  47. elif level == 'garage18':
  48. print('setting color of', curscene)
  49. curscene.world.zenithColor = [0, 0.0, 0.0, 0]
  50. curscene.world.horizonColor = [0, 0, 0.0, 0]
  51. #main.mistEnable = True
  52. #main.mistIntensity = .9
  53. #main.mistStart = 1
  54. #main.mistDistance = 5
  55. else:
  56. cam['BC_BRIGHTNESS'] = 1.0
  57. cam['BC_CONTRAST'] = 1.0
  58. main.world.zenithColor = [1.0, .9, .975, 0]
  59. main.world.horizonColor = [.42, .555, .823, 0]
  60. #main.mistEnable = False
  61. main()