Browse Source

misc cleanup2

shuvit 5 years ago
parent
commit
e7db37c7c5
1 changed files with 25 additions and 20 deletions
  1. 25
    20
      controller2.py

+ 25
- 20
controller2.py View File

1
-    #shuvit.org
1
+#shuvit.org
2
 
2
 
3
-    # control script
3
+# control script
4
+    
5
+
6
+import bge
7
+import GameLogic
8
+import ctypes
9
+import math 
10
+from sys import platform   
11
+from mathutils import Vector
12
+    
4
 def main():
13
 def main():
5
     #scale = .3
14
     #scale = .3
6
     #action layers
15
     #action layers
7
     #0-14 rolling
16
     #0-14 rolling
8
     #fliplay = 500
17
     #fliplay = 500
9
     #grindlay = 700
18
     #grindlay = 700
10
-    os = 'Windows'
11
-    from sys import platform
12
-    if platform != "win32":
13
-     os = 'Linux'
14
-    def onWindows():
15
-     return os == 'Windows'
16
-    from mathutils import Vector
19
+#    os = 'Windows'
20
+#    
21
+#    if platform != "win32":
22
+#     os = 'Linux'
23
+#    def onWindows():
24
+#     return os == 'Windows'
25
+    
17
 
26
 
18
-    import bge
19
-    import GameLogic
20
-    import ctypes
21
-    import math
22
 
27
 
23
     scene = bge.logic.getCurrentScene()
28
     scene = bge.logic.getCurrentScene()
24
     try:
29
     try:
26
         init=1
31
         init=1
27
     except:
32
     except:
28
         init=0
33
         init=0
29
-    if init:
30
-        cont.GameLogic.getCurrentController()
31
-        own = cont.getOwner()
32
-        name = own.getName()
33
-        if not GameLogic.DictObjects.has_key(name):
34
-            GameLogic.DictObjects[name]=cont
35
-        own.init=0
34
+#    if init:
35
+#        cont.GameLogic.getCurrentController()
36
+#        own = cont.getOwner()
37
+#        name = own.getName()
38
+#        if not GameLogic.DictObjects.has_key(name):
39
+#            GameLogic.DictObjects[name]=cont
40
+#        own.init=0
36
     #reduction = 400000
41
     #reduction = 400000
37
     #axisTh = 0.03 
42
     #axisTh = 0.03 
38
 
43
 

Loading…
Cancel
Save