Browse Source

joytimers rewrite_b

shuvit 4 years ago
parent
commit
7a9d8debc3
1 changed files with 9 additions and 9 deletions
  1. 9
    9
      scripts/joytimers.py

+ 9
- 9
scripts/joytimers.py View File

31
 		def update(self):
31
 		def update(self):
32
 			dict = bge.logic.globalDict
32
 			dict = bge.logic.globalDict
33
 	
33
 	
34
-			def q6(val):
34
+			def q6():
35
 				if dict[self.ud] > .04 and dict[self.lr] < -0.04:
35
 				if dict[self.ud] > .04 and dict[self.lr] < -0.04:
36
 					return countdown
36
 					return countdown
37
 				
37
 				
38
-			def q8(val):
38
+			def q8():
39
 				if dict[self.ud] < -.04 and dict[self.lr] < -0.04:
39
 				if dict[self.ud] < -.04 and dict[self.lr] < -0.04:
40
 					return countdown
40
 					return countdown
41
 								
41
 								
42
-			def q2(val):
42
+			def q2():
43
 				if dict[self.ud] < -.04 and dict[self.lr] > 0.04:
43
 				if dict[self.ud] < -.04 and dict[self.lr] > 0.04:
44
 					return countdown
44
 					return countdown
45
 
45
 
46
-			def q4(val):
46
+			def q4():
47
 				if dict[self.ud] > .04 and dict[self.lr] > 0.04:
47
 				if dict[self.ud] > .04 and dict[self.lr] > 0.04:
48
 					return countdown		
48
 					return countdown		
49
 
49
 
50
-			def q5(val):
50
+			def q5():
51
 				if dict[self.ud] > .07 and self.q4 is not countdown and self.q6 is not countdown:
51
 				if dict[self.ud] > .07 and self.q4 is not countdown and self.q6 is not countdown:
52
 					return countdown		
52
 					return countdown		
53
 
53
 
54
-			def q1(val):
54
+			def q1():
55
 				if dict[self.ud] < -.07 and self.q8 is not countdown and self.q2 is not countdown:
55
 				if dict[self.ud] < -.07 and self.q8 is not countdown and self.q2 is not countdown:
56
 					return countdown		
56
 					return countdown		
57
 
57
 
58
-			def q3(val):
58
+			def q3():
59
 				if dict[self.lr] > .07 and self.q2 is not countdown and self.q4 is not countdown:
59
 				if dict[self.lr] > .07 and self.q2 is not countdown and self.q4 is not countdown:
60
 					return countdown				
60
 					return countdown				
61
 
61
 
62
-			def q7(val):
62
+			def q7():
63
 				if dict[self.lr] < -.07 and self.q6 is not countdown and self.q8 is not countdown:
63
 				if dict[self.lr] < -.07 and self.q6 is not countdown and self.q8 is not countdown:
64
 					return countdown		
64
 					return countdown		
65
 
65
 
66
 			for cur_q in self.qs:
66
 			for cur_q in self.qs:
67
 				val = getattr(self, cur_q)
67
 				val = getattr(self, cur_q)
68
-				v2 = locals()[cur_q](val)
68
+				v2 = locals()[cur_q]()
69
 				if v2 is not None:
69
 				if v2 is not None:
70
 					setattr(self, cur_q, v2) 
70
 					setattr(self, cur_q, v2) 
71
 				elif val > 0:
71
 				elif val > 0:

Loading…
Cancel
Save