Browse Source

throw deck colors

shuvit 3 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,7 +90,7 @@ class getData:
90 90
         deck = scene.objects["deck"]
91 91
         trucks = scene.objects["trucks"]
92 92
         playing_layer = 0
93
-        for x in range(3020):
93
+        for x in range(7):
94 94
             l1 = skater.isPlayingAction(x)
95 95
             if l1 == True:
96 96
                 playing_layer = x

+ 28
- 5
SortData.py View File

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

+ 1
- 1
Startup.py View File

@@ -149,5 +149,5 @@ def main():
149 149
     dict['music_start'] = False  
150 150
     dict['npause'] = False
151 151
     dict['playback'] = False  
152
-
152
+    
153 153
 main()

+ 23
- 0
colors.py View File

@@ -6,8 +6,11 @@ scene = bge.logic.getCurrentScene()
6 6
 shirt = scene.objects["Char4:Zshirtt1"]
7 7
 deck = scene.objects["deck"]
8 8
 throw_deck = scene.objectsInactive["throw_deck"]
9
+throw_deck_trucks = scene.objectsInactive["throw_deck_trucks"]
9 10
 focus_deckA = scene.objectsInactive["focus_deckA"]
10 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 14
 shoeR = scene.objects['Char4:Shoes02.R']
12 15
 shoeL = scene.objects['Char4:Shoes02.L']
13 16
 trucks = scene.objects['trucks']
@@ -15,6 +18,15 @@ wheel1 = scene.objects['rollen.000']
15 18
 wheel2 = scene.objects['rollen.001']
16 19
 wheel3 = scene.objects['rollen.002']
17 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 32
 white = [ .9, .9, .9, 1.0]
@@ -48,10 +60,21 @@ def main():
48 60
     shoeL.color = shoesC
49 61
     
50 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 66
     wheel1.color = [dict['wheel1_r'], dict['wheel1_g'], dict['wheel1_b'], 1]
52 67
     wheel2.color = [dict['wheel2_r'], dict['wheel2_g'], dict['wheel2_b'], 1]
53 68
     wheel3.color = [dict['wheel3_r'], dict['wheel3_g'], dict['wheel3_b'], 1]
54 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 79
     #print("set color", deck.color)
57 80
 

+ 1
- 3
load_char.py View File

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

+ 1
- 0
npause.py View File

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

+ 2
- 1
scene_init.py View File

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

Loading…
Cancel
Save