Added some models
This commit is contained in:
11
Game.py
11
Game.py
@@ -26,7 +26,7 @@ class game(ShowBase):
|
|||||||
#__ctrl = Controls.controls
|
#__ctrl = Controls.controls
|
||||||
# __game_mechanics = Game_Mechanics.Game_Mechanics()
|
# __game_mechanics = Game_Mechanics.Game_Mechanics()
|
||||||
__onscreentext1 = OnscreenText
|
__onscreentext1 = OnscreenText
|
||||||
__actor1 = Actor
|
__actor1 = 0
|
||||||
__p3d_conf = loadPrcFile("conf/conf.prc") #Pfadangabe zum .prc File
|
__p3d_conf = loadPrcFile("conf/conf.prc") #Pfadangabe zum .prc File
|
||||||
|
|
||||||
|
|
||||||
@@ -41,15 +41,18 @@ class game(ShowBase):
|
|||||||
self.__onscreentext1 = OnscreenText(self.__statics._menupoints[0], font=font1, pos= (0.1,0))
|
self.__onscreentext1 = OnscreenText(self.__statics._menupoints[0], font=font1, pos= (0.1,0))
|
||||||
self.__onscreentext1.setText("Ich bewege mich fortlaufen!")
|
self.__onscreentext1.setText("Ich bewege mich fortlaufen!")
|
||||||
|
|
||||||
self.actor1 = Actor("data/models/myfile.bam")
|
#self.actor1 = Actor("data/models/myfile.bam")
|
||||||
self.actor1.reparentTo(self.render)
|
self.__actor1 = self.loader.load_model("data/models/myfile.bam")
|
||||||
|
self.__actor1.getPos()
|
||||||
|
self.__actor1.reparentTo(self.render)
|
||||||
|
|
||||||
self.taskMgr.add(self.task1, "task1")
|
self.taskMgr.add(self.task1, "task1")
|
||||||
|
|
||||||
def task1(self, task):
|
def task1(self, task):
|
||||||
_x = -2.8 + (task.time*0.3)
|
_x = -2.8 + (task.time*0.3)
|
||||||
print("Task läuft seit: " + str(_x))
|
print("Task läuft seit: " + str(_x))
|
||||||
#self.__onscreentext1.setPos(x=_x, y=0)
|
print(str(self.__actor1.getPos()))
|
||||||
|
self.__actor1.setPos(1*_x,1*_x,0)
|
||||||
|
|
||||||
if (_x >= 2.8000):
|
if (_x >= 2.8000):
|
||||||
print("Finished")
|
print("Finished")
|
||||||
|
|||||||
Reference in New Issue
Block a user