|
@@ -8,6 +8,14 @@ JUST_ACTIVATED = bge.logic.KX_INPUT_JUST_ACTIVATED
|
8
|
8
|
def endpoint(funct, motion, dict, cont):
|
9
|
9
|
print('endpoint', funct,motion)
|
10
|
10
|
scene = bge.logic.getCurrentScene()
|
|
11
|
+
|
|
12
|
+ scenes = bge.logic.getSceneList()
|
|
13
|
+ main_scene = [scene for scene in scenes if scene.name=="main"][0]
|
|
14
|
+ main_empty = main_scene.objects['Empty']
|
|
15
|
+ own = cont.owner
|
|
16
|
+ import Settings
|
|
17
|
+ load_timer = 100
|
|
18
|
+
|
11
|
19
|
shirt = scene.objects["Char4:Zshirtt1"]
|
12
|
20
|
shoeR = scene.objects['Char4:Shoes02.R']
|
13
|
21
|
shoeL = scene.objects['Char4:Shoes02.L']
|
|
@@ -406,7 +414,89 @@ def endpoint(funct, motion, dict, cont):
|
406
|
414
|
rot = [ 0, b, 0]
|
407
|
415
|
em.applyRotation(rot,True)
|
408
|
416
|
cam['sun_rot_y'] = round(b,2)
|
409
|
|
- dict['sun_rot_y'] = round(b,2)
|
|
417
|
+ dict['sun_rot_y'] = round(b,2)
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+ #levels
|
|
422
|
+ if funct == 'Demo Scene':
|
|
423
|
+ if motion == 'inc':
|
|
424
|
+ level = "pats"
|
|
425
|
+ main_empty["level"] = "pats"
|
|
426
|
+ own["level"] = level
|
|
427
|
+ Settings.writeSettings()
|
|
428
|
+ Settings.readSettings()
|
|
429
|
+ #cont.activate(own.actuators['restart'])
|
|
430
|
+ #Settings.loadlevel()
|
|
431
|
+ dict['load_timer'] = load_timer
|
|
432
|
+ dict['reload_timer'] = 250
|
|
433
|
+ dict['overlay_fadein'] = 1
|
|
434
|
+
|
|
435
|
+ if funct == 'Park A':
|
|
436
|
+ if motion == 'inc':
|
|
437
|
+ level = "j_scene"
|
|
438
|
+ main_empty["level"] = "j_scene"
|
|
439
|
+ own["level"] = level
|
|
440
|
+ Settings.writeSettings()
|
|
441
|
+ Settings.readSettings()
|
|
442
|
+ #cont.activate(own.actuators['restart'])
|
|
443
|
+ #Settings.loadlevel()
|
|
444
|
+ dict['load_timer'] = load_timer
|
|
445
|
+ dict['reload_timer'] = 250
|
|
446
|
+ dict['overlay_fadein'] = 1
|
|
447
|
+
|
|
448
|
+ if funct == 'Empty Lot':
|
|
449
|
+ if motion == 'inc':
|
|
450
|
+ level = "lot"
|
|
451
|
+ main_empty["level"] = "lot"
|
|
452
|
+ own["level"] = level
|
|
453
|
+ Settings.writeSettings()
|
|
454
|
+ Settings.readSettings()
|
|
455
|
+ #cont.activate(own.actuators['restart'])
|
|
456
|
+ #Settings.loadlevel()
|
|
457
|
+ dict['load_timer'] = load_timer
|
|
458
|
+ dict['reload_timer'] = 250
|
|
459
|
+ dict['overlay_fadein'] = 1
|
|
460
|
+
|
|
461
|
+ if funct == 'Training':
|
|
462
|
+ if motion == 'inc':
|
|
463
|
+ level = "train"
|
|
464
|
+ main_empty["level"] = "train"
|
|
465
|
+ own["level"] = level
|
|
466
|
+ Settings.writeSettings()
|
|
467
|
+ Settings.readSettings()
|
|
468
|
+ #cont.activate(own.actuators['restart'])
|
|
469
|
+ #Settings.loadlevel()
|
|
470
|
+ dict['load_timer'] = load_timer
|
|
471
|
+ dict['reload_timer'] = 250
|
|
472
|
+ dict['overlay_fadein'] = 1
|
|
473
|
+
|
|
474
|
+ if funct == 'Spine':
|
|
475
|
+ if motion == 'inc':
|
|
476
|
+ level = "spine"
|
|
477
|
+ main_empty["level"] = "spine"
|
|
478
|
+ own["level"] = level
|
|
479
|
+ Settings.writeSettings()
|
|
480
|
+ Settings.readSettings()
|
|
481
|
+ #cont.activate(own.actuators['restart'])
|
|
482
|
+ #Settings.loadlevel()
|
|
483
|
+ dict['load_timer'] = load_timer
|
|
484
|
+ dict['reload_timer'] = 250
|
|
485
|
+ dict['overlay_fadein'] = 1
|
|
486
|
+
|
|
487
|
+ if funct == 'Warehouse':
|
|
488
|
+ if motion == 'inc':
|
|
489
|
+ level = "warehouse"
|
|
490
|
+ main_empty["level"] = "warehouse"
|
|
491
|
+ own["level"] = level
|
|
492
|
+ Settings.writeSettings()
|
|
493
|
+ Settings.readSettings()
|
|
494
|
+ #cont.activate(own.actuators['restart'])
|
|
495
|
+ #Settings.loadlevel()
|
|
496
|
+ dict['load_timer'] = load_timer
|
|
497
|
+ dict['reload_timer'] = 250
|
|
498
|
+ dict['overlay_fadein'] = 1
|
|
499
|
+
|
410
|
500
|
|
411
|
501
|
#=======
|
412
|
502
|
#end exit functions
|
|
@@ -414,7 +504,7 @@ def endpoint(funct, motion, dict, cont):
|
414
|
504
|
def get_c_list(dict):
|
415
|
505
|
#main menu
|
416
|
506
|
if dict['mlevel'] == 0:
|
417
|
|
- dict['current_list'] = ['exit', 'settings', 'level', 'replay', 'restart']
|
|
507
|
+ dict['current_list'] = ['settings', 'level', 'replay', 'restart', 'exit']
|
418
|
508
|
|
419
|
509
|
#opt = dict['current_list'][dict['current_index']]
|
420
|
510
|
|
|
@@ -423,7 +513,9 @@ def get_c_list(dict):
|
423
|
513
|
#if opt == 'settings':
|
424
|
514
|
dict['current_list'] = ['graphics', 'player', 'level', 'camera', 'physics']
|
425
|
515
|
if dict['lv0_opt'] == 'replay':
|
426
|
|
- dict['current_list'] = ['enter replay', 'recorder on', 'record length']
|
|
516
|
+ dict['current_list'] = ['enter replay', 'recorder on', 'record length']
|
|
517
|
+ if dict['lv0_opt'] == 'level':
|
|
518
|
+ dict['current_list'] = ['Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse']
|
427
|
519
|
if dict['mlevel'] == 2:
|
428
|
520
|
if dict['lv1_opt'] == 'graphics':
|
429
|
521
|
#if opt == 'settings':
|
|
@@ -557,7 +649,7 @@ def init(own, dict):
|
557
|
649
|
dict['mlevel'] = 0
|
558
|
650
|
dict['current_opt'] = ''
|
559
|
651
|
dict['pause_menu_text'] = ''
|
560
|
|
- dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength']
|
|
652
|
+ dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse']
|
561
|
653
|
|
562
|
654
|
def output(dict):
|
563
|
655
|
try:
|