shuvit 6 년 전
부모
커밋
fbccd177c6
4개의 변경된 파일89개의 추가작업 그리고 27개의 파일을 삭제
  1. 6
    0
      Manager.py
  2. 29
    1
      co_ActionState.py
  3. 13
    4
      controller2.py
  4. 41
    22
      walk.py

+ 6
- 0
Manager.py 파일 보기

126
             own["playbackBroken"] = False
126
             own["playbackBroken"] = False
127
             freecam.worldPosition = own.worldPosition
127
             freecam.worldPosition = own.worldPosition
128
             followcam.worldPosition = own.worldPosition
128
             followcam.worldPosition = own.worldPosition
129
+            cube['grindcement_vol'] = 0
130
+            cube['grindcement_pitch'] = 0
131
+            cube['grindrail_vol'] = 0
132
+            cube['grindrail_pitch'] = 0 
133
+            cube['sroll_vol'] = 0
134
+            cube['sroll_pitch'] = 0             
129
             
135
             
130
 
136
 
131
         if own["playback"]:
137
         if own["playback"]:

+ 29
- 1
co_ActionState.py
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 13
- 4
controller2.py 파일 보기

160
     if r_ground.triggered: own['wallride_off'] = 0
160
     if r_ground.triggered: own['wallride_off'] = 0
161
     own['pop_sound'] = 0
161
     own['pop_sound'] = 0
162
     own['land_sound'] = 0
162
     own['land_sound'] = 0
163
+    own['revert_sound'] = 0
163
     #own['fall'] = 0 
164
     #own['fall'] = 0 
164
 
165
 
165
     #joystick location timers
166
     #joystick location timers
310
         if r_ground.triggered == True and skater.isPlayingAction(fliplay) and own['jump_timer'] < 40 and playing_frame < 14 and playing_frame > 3:
311
         if r_ground.triggered == True and skater.isPlayingAction(fliplay) and own['jump_timer'] < 40 and playing_frame < 14 and playing_frame > 3:
311
             own['fall'] = 1
312
             own['fall'] = 1
312
             print("fall: ", playing_frame, own['jump_timer'])
313
             print("fall: ", playing_frame, own['jump_timer'])
314
+            if STANCE == 0:
315
+                own['requestAction'] = 'reg_fall1'
316
+            if STANCE == 1:
317
+                own['requestAction'] = 'fak_fall1'                
313
     check_fall()
318
     check_fall()
314
     def check_landing():
319
     def check_landing():
315
         lf_ground = own["lF_ground"]
320
         lf_ground = own["lF_ground"]
2416
         else:
2421
         else:
2417
             own['requestAction'] = 'revert1'            
2422
             own['requestAction'] = 'revert1'            
2418
         own['revert_timer'] = 20 
2423
         own['revert_timer'] = 20 
2419
-        cont.activate(own.actuators["revertSound"])      
2424
+        cont.activate(own.actuators["revertSound"]) 
2425
+        own['revert_sound'] = 1     
2420
     def revert2():
2426
     def revert2():
2421
         own["Q3oncdl"] = 0
2427
         own["Q3oncdl"] = 0
2422
         own["Q4oncdl"] = 0
2428
         own["Q4oncdl"] = 0
2441
         else:     
2447
         else:     
2442
             own['requestAction'] = 'revert2'       
2448
             own['requestAction'] = 'revert2'       
2443
         own['revert_timer'] = 20 
2449
         own['revert_timer'] = 20 
2444
-        cont.activate(own.actuators["revertSound"])         
2450
+        cont.activate(own.actuators["revertSound"])   
2451
+        own['revert_sound'] = 1      
2445
     def revert3():
2452
     def revert3():
2446
         own["Q7oncdl"] = 0
2453
         own["Q7oncdl"] = 0
2447
         own["Q8oncdl"] = 0
2454
         own["Q8oncdl"] = 0
2467
         else:       
2474
         else:       
2468
             own['requestAction'] = 'revert3' 
2475
             own['requestAction'] = 'revert3' 
2469
         own['revert_timer'] = 20 
2476
         own['revert_timer'] = 20 
2470
-        cont.activate(own.actuators["revertSound"])      
2477
+        cont.activate(own.actuators["revertSound"]) 
2478
+        own['revert_sound'] = 1     
2471
     def revert4():
2479
     def revert4():
2472
         own["Q7oncdl"] = 0
2480
         own["Q7oncdl"] = 0
2473
         own["Q8oncdl"] = 0
2481
         own["Q8oncdl"] = 0
2493
             own['requestAction'] = 'revert4'
2501
             own['requestAction'] = 'revert4'
2494
             print("normal revert")        
2502
             print("normal revert")        
2495
         own['revert_timer'] = 20 
2503
         own['revert_timer'] = 20 
2496
-        cont.activate(own.actuators["revertSound"])       
2504
+        cont.activate(own.actuators["revertSound"]) 
2505
+        own['revert_sound'] = 1      
2497
 
2506
 
2498
     def powerslide():
2507
     def powerslide():
2499
         own['powerslide_counter'] = own['powerslide_counter'] + 1
2508
         own['powerslide_counter'] = own['powerslide_counter'] + 1

+ 41
- 22
walk.py 파일 보기

332
         fliplay = 301
332
         fliplay = 301
333
         fliplay2 = 302 
333
         fliplay2 = 302 
334
         fliplay3 = 303
334
         fliplay3 = 303
335
+        own['grindcement_vol'] = 0
336
+        own['grindcement_pitch'] = 0
337
+        own['grindrail_vol'] = 0
338
+        own['grindrail_pitch'] = 0 
339
+        own['sroll_vol'] = 0
340
+        own['sroll_pitch'] = 0                 
335
         try:
341
         try:
336
             vel = own['offboard_vel']
342
             vel = own['offboard_vel']
337
             vel = [velx, vel.y, vel.z]           
343
             vel = [velx, vel.y, vel.z]           
398
         #camera.max = 1.25
404
         #camera.max = 1.25
399
         #cont.activate(cam.actuators['Camera']) 
405
         #cont.activate(cam.actuators['Camera']) 
400
         
406
         
401
-        deckact = deck.actuators["Visibility"]
402
-        trucksact = trucks.actuators["Visibility"]
403
-        wheel1act = wheel1.actuators["Visibility"]
404
-        wheel2act = wheel2.actuators["Visibility"]
405
-        wheel3act = wheel3.actuators["Visibility"]
406
-        wheel4act = wheel4.actuators["Visibility"]        
407
-        deckact.visibility = True
408
-        trucksact.visibility = True
409
-        wheel1act.visibility = True
410
-        wheel2act.visibility = True
411
-        wheel3act.visibility = True
412
-        wheel4act.visibility = True  
413
-        cont.activate(deck.actuators['Visibility'])
414
-        cont.activate(trucks.actuators['Visibility'])
415
-        cont.activate(wheel1.actuators['Visibility'])
416
-        cont.activate(wheel2.actuators['Visibility'])
417
-        cont.activate(wheel3.actuators['Visibility'])
418
-        cont.activate(wheel4.actuators['Visibility']) 
419
-        own['throw_deck'] = False 
420
-        throw_deck_empty = scene.objects["throw_deck_empty"]
421
-        throw_deck_empty['kill_deck'] = 1 
407
+
422
         fliplay3 = fliplay2 + 1 
408
         fliplay3 = fliplay2 + 1 
423
         if dropinCol.positive == True: 
409
         if dropinCol.positive == True: 
424
                        
410
                        
482
         fliplay3 = 6000 
468
         fliplay3 = 6000 
483
         onboard_speed = .1                                      
469
         onboard_speed = .1                                      
484
         own['getonboard'] = 0 
470
         own['getonboard'] = 0 
485
-    if yBut == False and lasty == True:
471
+    if (yBut == False and lasty == True) or yBut == True and dropinCol.positive:
472
+        
473
+        deckact = deck.actuators["Visibility"]
474
+        trucksact = trucks.actuators["Visibility"]
475
+        wheel1act = wheel1.actuators["Visibility"]
476
+        wheel2act = wheel2.actuators["Visibility"]
477
+        wheel3act = wheel3.actuators["Visibility"]
478
+        wheel4act = wheel4.actuators["Visibility"]        
479
+        deckact.visibility = True
480
+        trucksact.visibility = True
481
+        wheel1act.visibility = True
482
+        wheel2act.visibility = True
483
+        wheel3act.visibility = True
484
+        wheel4act.visibility = True  
485
+        cont.activate(deck.actuators['Visibility'])
486
+        cont.activate(trucks.actuators['Visibility'])
487
+        cont.activate(wheel1.actuators['Visibility'])
488
+        cont.activate(wheel2.actuators['Visibility'])
489
+        cont.activate(wheel3.actuators['Visibility'])
490
+        cont.activate(wheel4.actuators['Visibility']) 
491
+        own['throw_deck'] = False 
492
+        throw_deck_empty = scene.objects["throw_deck_empty"]
493
+        throw_deck_empty['kill_deck'] = 1 
494
+    if (yBut == False and lasty == True):               
486
         own['getonboard'] = 1       
495
         own['getonboard'] = 1       
487
 
496
 
488
 def nextframe():
497
 def nextframe():
745
 def fall():
754
 def fall():
746
     if own['fall'] == True:
755
     if own['fall'] == True:
747
         falldeck()
756
         falldeck()
757
+        
748
         if STANCE == 1:
758
         if STANCE == 1:
759
+            own['requestAction'] = 'fak_fall1'
749
             own.setLinearVelocity([3,2,0], True)
760
             own.setLinearVelocity([3,2,0], True)
750
         else:
761
         else:
762
+            own['requestAction'] = 'reg_fall1'
751
             own.setLinearVelocity([-3,-2,0], True)    
763
             own.setLinearVelocity([-3,-2,0], True)    
752
         own['fall'] = False
764
         own['fall'] = False
753
 
765
 
1078
     own['deckvis'] = 1
1090
     own['deckvis'] = 1
1079
 else:
1091
 else:
1080
     own['deckvis'] = 0       
1092
     own['deckvis'] = 0       
1093
+
1094
+if own['requestAction'] == 'empty' or own['requestAction'] == None:
1095
+    if STANCE == 0:
1096
+        own['requestAction'] = 'reg_idle1'
1097
+    if STANCE == 1:
1098
+        own['requestAction'] = 'fak_idle1'        
1099
+    
1081
                     
1100
                     
1082
 onboard() 
1101
 onboard() 
1083
 jump()
1102
 jump()

Loading…
취소
저장