-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
63 lines (46 loc) · 1.55 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python2.7
import urho
v = urho.Vector3()
c = urho.Context()
fs = urho.FileSystem(c)
from urho import StringHash as sh
import os
print (os.getcwd())
class App(urho.Application):
#def __init__(self, name):
# Dog.__init__(self) # Without this, undefind behavior may occur if the C++ portions are referenced.
def __init__(self,c):
urho.Application.__init__(self,c)
# self.name = name
#def bark(self):
# return "yap!"
def Setup(self):
print 'Setting up the applicaiton'
self.engineParameters["WindowTitle"] = "PYrho3D"
return
def Start(self):
print 'Starting up the applicaiton'
fs = c.GetSubsystem('FileSystem')
commandFile = fs.GetProgramDir() + "Data/CommandLine.txt"
print commandFile
# with open(commandFile) as f:
# line = commandFile[0]
scriptfile = 'Scripts/NinjaSnowWar.as'
c.RegisterSubsystem(urho.Script(c))
cache = c.GetSubsystem('ResourceCache')
sf = cache.GetResource('ScriptFile',scriptfile)
sf.Execute("void Start()")
a = App(c)
#help(a)
var = urho.Variant(u'/home/nathan/Desktop/testClang')
print(var)
print(fs.GetCurrentDir())
#a.engineParameters[urho.StringHash('ResourcePrefixPaths')] = var
#a.engineParameters["FullScreen"] = False
#a.engineParameters[urho.StringHash('FullScreen')] = False
a.engineParameters["WindowWidth"] = 500
c.GetSubsystem(sh('Input')).SetMouseVisible(True)
del fs
c.GetSubsystem(sh('Input')).SetMouseVisible(True)
a.Run()
#ep = a.engineParameters