Hi.
I have problem when i compile my two files
First
import direct.directbase.DirectStart
from direct.gui.OnscreenText import OnscreenText
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from direct.gui.OnscreenImage import OnscreenImage
from pandac.PandaModules import TransparencyAttrib
from model.py import panda
#wczytanie obrazka
class gui:
ludzik=panda(1,1,1,1)
obrazek_gui = OnscreenImage(image = 'gui2.png',scale=(0.13), pos = (-1.2, 0, 0.88))
obrazek_gui.setTransparency(TransparencyAttrib.MAlpha)
#Wyswietlanie NICKA
output = ""
tex_nicka = OnscreenText(text = output, pos = (0.95,-0.95),
scale = 0.07,fg=(1,0.5,0.5,1),align=TextNode.ACenter,mayChange=1)
########################Argumenty do paskow
def Zycia_pasek(arg):
pasek_zyc['value'] += arg
def Vit_pasek(arg):
pasek_vit['value'] += arg
guzik_hp = DirectButton(text="+10 HP",scale=0.05,pos=(1,.6,0), command=Zycia_pasek,extraArgs = [10])
guzik_vit = DirectButton(text="+10 SP",scale=0.05,pos=(0,.6,0), command=Vit_pasek,extraArgs = [10])
# PASKI
global pasek_zyc
pasek_zyc = DirectWaitBar(text = "50%" ,range=100,scale=0.2, value=0,pos=(-0.8,0,0.95))
global pasek_vit
pasek_vit = DirectWaitBar(text = "50%" ,range=100,scale=0.2,barColor=(10,10,255,10), value=0,pos=(-.8,0,0.85))
run()
And simple next code
from direct.actor import Actor
import direct.directbase.DirectStart
def panda(x,y,z,skala):
panda = Actor.Actor('panda.egg.pz', {
'chodzi':'panda-walk.egg.pz'
})
panda.setScale(skala)
panda.setPos(x,y,z)
panda.reparentTo(render)
run()
OK when i run first scipt i only see gray winows but when i comment in first script
from model.py import panda and
ludzik=panda(1,1,1,1)
i see buttons,bar and other.
And other question, i try make simple isometric game. Can i use 2d graphic for map and 3d for actors? If yes can you say how?
Sorry for my engilsh