Browse Source

throw deck colors

shuvit 5 years ago
parent
commit
adcb9dd0be
7 changed files with 57 additions and 11 deletions
  1. 1
    1
      Record.py
  2. 28
    5
      SortData.py
  3. 1
    1
      Startup.py
  4. 23
    0
      colors.py
  5. 1
    3
      load_char.py
  6. 1
    0
      npause.py
  7. 2
    1
      scene_init.py

+ 1
- 1
Record.py View File

90
         deck = scene.objects["deck"]
90
         deck = scene.objects["deck"]
91
         trucks = scene.objects["trucks"]
91
         trucks = scene.objects["trucks"]
92
         playing_layer = 0
92
         playing_layer = 0
93
-        for x in range(3020):
93
+        for x in range(7):
94
             l1 = skater.isPlayingAction(x)
94
             l1 = skater.isPlayingAction(x)
95
             if l1 == True:
95
             if l1 == True:
96
                 playing_layer = x
96
                 playing_layer = x

+ 28
- 5
SortData.py View File

296
                         if loadedGameName == gameName:
296
                         if loadedGameName == gameName:
297
 
297
 
298
                             positionList = allDataList[1].split()
298
                             positionList = allDataList[1].split()
299
+                            print('1')
299
                             orientationList = allDataList[2].split()
300
                             orientationList = allDataList[2].split()
301
+                            print('2')
300
                             scaleList = allDataList[3].split()
302
                             scaleList = allDataList[3].split()
303
+                            print('3')
301
                             colorList = allDataList[4].split()
304
                             colorList = allDataList[4].split()
305
+                            print('4')
302
                             stateList = allDataList[5].split()
306
                             stateList = allDataList[5].split()
307
+                            print('5')
303
                             visibilityList = allDataList[6].split()
308
                             visibilityList = allDataList[6].split()
309
+                            print('6')
304
                             skaterAnimList = allDataList[7].split()
310
                             skaterAnimList = allDataList[7].split()
311
+                            print('7')
305
                             skaterAnimFList = allDataList[8].split()
312
                             skaterAnimFList = allDataList[8].split()
313
+                            print('8')
306
                             deckAnimList = allDataList[9].split()
314
                             deckAnimList = allDataList[9].split()
315
+                            print('9')
307
                             deckAnimFList = allDataList[10].split()
316
                             deckAnimFList = allDataList[10].split()
317
+                            print('1')
308
                             srollVolList = allDataList[11].split()
318
                             srollVolList = allDataList[11].split()
319
+                            print('1')
309
                             srollPitchList = allDataList[12].split()
320
                             srollPitchList = allDataList[12].split()
321
+                            print('1')
310
                             sgrind_cementVolList = allDataList[13].split()
322
                             sgrind_cementVolList = allDataList[13].split()
323
+                            print('1')
311
                             sgrind_cementPitchList = allDataList[14].split()
324
                             sgrind_cementPitchList = allDataList[14].split()
325
+                            print('1')
312
                             sgrind_railVolList = allDataList[15].split() 
326
                             sgrind_railVolList = allDataList[15].split() 
327
+                            print('1')
313
                             sgrind_railPitchList = allDataList[16].split()
328
                             sgrind_railPitchList = allDataList[16].split()
329
+                            print('1')
314
                             spopsoundList = allDataList[17].split()
330
                             spopsoundList = allDataList[17].split()
331
+                            print('1')
315
                             slandsoundList = allDataList[18].split()
332
                             slandsoundList = allDataList[18].split()
333
+                            print('1')
316
                             sdeckvisList = allDataList[19].split()
334
                             sdeckvisList = allDataList[19].split()
335
+                            print('1')
317
                             positiontdList = allDataList[20].split()
336
                             positiontdList = allDataList[20].split()
318
-                            orientationtdList = allDataList[21].split()                            
337
+                            print('1')
338
+                            orientationtdList = allDataList[21].split()  
339
+                            print('1')                          
319
                             srevertsoundList = allDataList[22].split()
340
                             srevertsoundList = allDataList[22].split()
341
+                            print('1')
320
                             
342
                             
321
                             if printDebug:
343
                             if printDebug:
322
                                 print("Read file "+allDataPath)
344
                                 print("Read file "+allDataPath)
323
-                    except:
324
-                        print("error reading replay data")        
325
-            except IOError:
345
+                    except Exception as e:
346
+                        print("error reading replay data", e)        
347
+            #except IOError:
348
+            except Exception as e:   
326
                 if printDebug:
349
                 if printDebug:
327
-                    print("Error reading "+allDataPath)
350
+                    print("Error reading "+allDataPath, e)
328
 
351
 
329
     def returnPosition(objIndex, valueIndex):
352
     def returnPosition(objIndex, valueIndex):
330
         
353
         

+ 1
- 1
Startup.py View File

149
     dict['music_start'] = False  
149
     dict['music_start'] = False  
150
     dict['npause'] = False
150
     dict['npause'] = False
151
     dict['playback'] = False  
151
     dict['playback'] = False  
152
-
152
+    
153
 main()
153
 main()

+ 23
- 0
colors.py View File

6
 shirt = scene.objects["Char4:Zshirtt1"]
6
 shirt = scene.objects["Char4:Zshirtt1"]
7
 deck = scene.objects["deck"]
7
 deck = scene.objects["deck"]
8
 throw_deck = scene.objectsInactive["throw_deck"]
8
 throw_deck = scene.objectsInactive["throw_deck"]
9
+throw_deck_trucks = scene.objectsInactive["throw_deck_trucks"]
9
 focus_deckA = scene.objectsInactive["focus_deckA"]
10
 focus_deckA = scene.objectsInactive["focus_deckA"]
10
 focus_deckB = scene.objectsInactive["focus_deckB"]
11
 focus_deckB = scene.objectsInactive["focus_deckB"]
12
+focus_deckA_trucks = scene.objectsInactive["focus_deckA_trucks"]
13
+focus_deckB_trucks = scene.objectsInactive["focus_deckB_trucks"]
11
 shoeR = scene.objects['Char4:Shoes02.R']
14
 shoeR = scene.objects['Char4:Shoes02.R']
12
 shoeL = scene.objects['Char4:Shoes02.L']
15
 shoeL = scene.objects['Char4:Shoes02.L']
13
 trucks = scene.objects['trucks']
16
 trucks = scene.objects['trucks']
15
 wheel2 = scene.objects['rollen.001']
18
 wheel2 = scene.objects['rollen.001']
16
 wheel3 = scene.objects['rollen.002']
19
 wheel3 = scene.objects['rollen.002']
17
 wheel4 = scene.objects['rollen.003']
20
 wheel4 = scene.objects['rollen.003']
21
+throw_deck_wheel1 = scene.objectsInactive["throw_deck_trucks_wheels"]
22
+throw_deck_wheel2 = scene.objectsInactive["throw_deck_trucks_wheels.001"]
23
+throw_deck_wheel3 = scene.objectsInactive["throw_deck_trucks_wheels.002"]
24
+throw_deck_wheel4 = scene.objectsInactive["throw_deck_trucks_wheels.003"]
25
+focus_deckA_wheel1 = scene.objectsInactive['focus_deckA_wheel1']
26
+focus_deckA_wheel2 = scene.objectsInactive['focus_deckA_wheel2']
27
+focus_deckB_wheel1 = scene.objectsInactive['focus_deckB_wheel1']
28
+focus_deckB_wheel2 = scene.objectsInactive['focus_deckB_wheel2']
29
+
18
 
30
 
19
 ##
31
 ##
20
 white = [ .9, .9, .9, 1.0]
32
 white = [ .9, .9, .9, 1.0]
48
     shoeL.color = shoesC
60
     shoeL.color = shoesC
49
     
61
     
50
     trucks.color = [dict['trucks_r'], dict['trucks_g'], dict['trucks_b'], 1]
62
     trucks.color = [dict['trucks_r'], dict['trucks_g'], dict['trucks_b'], 1]
63
+    throw_deck_trucks.color = [dict['trucks_r'], dict['trucks_g'], dict['trucks_b'], 1]
64
+    focus_deckA_trucks.color = [dict['trucks_r'], dict['trucks_g'], dict['trucks_b'], 1]
65
+    focus_deckB_trucks.color = [dict['trucks_r'], dict['trucks_g'], dict['trucks_b'], 1]
51
     wheel1.color = [dict['wheel1_r'], dict['wheel1_g'], dict['wheel1_b'], 1]
66
     wheel1.color = [dict['wheel1_r'], dict['wheel1_g'], dict['wheel1_b'], 1]
52
     wheel2.color = [dict['wheel2_r'], dict['wheel2_g'], dict['wheel2_b'], 1]
67
     wheel2.color = [dict['wheel2_r'], dict['wheel2_g'], dict['wheel2_b'], 1]
53
     wheel3.color = [dict['wheel3_r'], dict['wheel3_g'], dict['wheel3_b'], 1]
68
     wheel3.color = [dict['wheel3_r'], dict['wheel3_g'], dict['wheel3_b'], 1]
54
     wheel4.color = [dict['wheel4_r'], dict['wheel4_g'], dict['wheel4_b'], 1]
69
     wheel4.color = [dict['wheel4_r'], dict['wheel4_g'], dict['wheel4_b'], 1]
70
+    throw_deck_wheel1.color = [dict['wheel1_r'], dict['wheel1_g'], dict['wheel1_b'], 1]
71
+    throw_deck_wheel2.color = [dict['wheel2_r'], dict['wheel2_g'], dict['wheel2_b'], 1]
72
+    throw_deck_wheel3.color = [dict['wheel3_r'], dict['wheel3_g'], dict['wheel3_b'], 1]
73
+    throw_deck_wheel4.color = [dict['wheel4_r'], dict['wheel4_g'], dict['wheel4_b'], 1]
74
+    focus_deckA_wheel1.color = [dict['wheel1_r'], dict['wheel1_g'], dict['wheel1_b'], 1]
75
+    focus_deckA_wheel2.color = [dict['wheel2_r'], dict['wheel2_g'], dict['wheel2_b'], 1]
76
+    focus_deckB_wheel1.color = [dict['wheel3_r'], dict['wheel3_g'], dict['wheel3_b'], 1]
77
+    focus_deckB_wheel2.color = [dict['wheel4_r'], dict['wheel4_g'], dict['wheel4_b'], 1]    
55
     
78
     
56
     #print("set color", deck.color)
79
     #print("set color", deck.color)
57
 
80
 

+ 1
- 3
load_char.py View File

1
-
2
 import bge
1
 import bge
3
 
2
 
4
 def ai(cont):  
3
 def ai(cont):  
63
 
62
 
64
 
63
 
65
     cont.activate(actu)
64
     cont.activate(actu)
66
-    
67
-        
65
+    

+ 1
- 0
npause.py View File

109
     #exit pause     
109
     #exit pause     
110
     if pause_state == 0 and last_pause == 1:
110
     if pause_state == 0 and last_pause == 1:
111
         Settings.writeSettings()
111
         Settings.writeSettings()
112
+        Settings.writeChar()
112
         own.restoreDynamics()
113
         own.restoreDynamics()
113
 
114
 
114
         if own['walk'] == False:
115
         if own['walk'] == False:

+ 2
- 1
scene_init.py View File

35
     # child is solid
35
     # child is solid
36
     ghost = False
36
     ghost = False
37
     # set parent
37
     # set parent
38
-    obj.setParent( parent, compound, ghost)  
38
+    obj.setParent( parent, compound, ghost) 
39
+    parent.worldPosition.z += .5 
39
   
40
   
40
     scene.gravity = [0,0,dict['gravity']]    
41
     scene.gravity = [0,0,dict['gravity']]    
41
     for i in scenes:
42
     for i in scenes:

Loading…
Cancel
Save