If I want to list my models in a separate file from my main Game file, what could I use?
This is what I have been trying to do, but it doesn’t work:
GGame.py
from direct.showbase.ShowBase import ShowBase
import GGameObjects
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
TunnelSection.setScale(0.25, 0.25, 0.25)
TunnelSection.setPos(-8, 42, 0)
app = MyApp()
app.run()
GGameObjects.py
from direct.showbase.ShowBase import ShowBase
class ObjectsList(ShowBase):
def __init__(self):
ShowBase.__init__(self)
TunnelSection = loader.loadModel("models/TunnelSection")
TunnelSection.reparentTo(render)
[/quote]