So far i have a large amount of Python code doing stuff. It has its own Loop, and i want to run panda within that loop. So i should use taskMgr.step(). I do not fully understand panda as of yet. So far i have this for an example;
from direct.showbase.ShowBase import ShowBase
from panda3d.core import TextNode
from direct.gui.OnscreenText import OnscreenText
from direct.interval.FunctionInterval import Wait,Func
from direct.task.Task import Task
import time
import sys
class MyApp(ShowBase):
def __init__(self):
self.accept("escape", sys.exit) #Escape quits
ShowBase.__init__(self)
taskMgr.add(self.DoMath, 'DoMath')
self.text1 = OnscreenText(text="nont", pos = (0.1, 0.7), scale = 0.1, mayChange = True)
def DoMath(self, task):
self.text1.setText(str(time.time()))
return task.cont
App = MyApp()
App.run()
My primary issue is that i want panda to run inside of a python loop something like this;
GameOn = 1
While GameOn = 1:
Call taskMgr.step() to keep panda happy
I cant seem to get the text1 to change with time.time() but that is another issue >:)
Thanks.