[TuT]Afisare viata mob

Închis
Avatar utilizator
.Kent
Nivel 1

Nivel 1
Mesaje: 110
Membru din: 28 Dec 2013, 10:12
Regat: Shinsoo
Aprecieri: 0
Mulţumiri: 2  
Medalii

Imagine
Intram in uitarget.py si cautam :

Cod: Selectaţi tot

def __init__(self):
Sub:

Cod: Selectaţi tot

        hpGauge = uiGauge()
        hpGauge.SetParent(self)
        hpGauge.MakeGauge(130, "red")
        hpGauge.Hide()
adaugam asta:

Cod: Selectaţi tot

        hpPercentxt = ui.TextLine()
        hpPercenttxt.SetParent(self)
        hpPercenttxt.SetPosition(160, 13)
        hpPercenttxt.SetText("")
        hpPercenttxt.Hide()
Cautam:

Cod: Selectaţi tot

        self.name = name
        self.hpGauge = hpGauge
Sub el adaugam:

Cod: Selectaţi tot

        self.hpPercenttxt = hpPercenttxt
cautam:

Cod: Selectaţi tot

def Destroy(self):
Sub el adaugam:

Cod: Selectaţi tot

self.hpPercenttxt = None
cautam :

Cod: Selectaţi tot

def ResetTargetBoard(self):
si cautati in functie randul asta :

Cod: Selectaţi tot

self.hpGauge.Hide()
si sub el adaugati :

Cod: Selectaţi tot

selfhpPercenttxt.Hide()

cautam :

Cod: Selectaţi tot

def SetHP(self,  hpPercentage)
si cautati in functie randul asta :

Cod: Selectaţi tot

self.UpdatePosition()
si sub el adaugati asta :

Cod: Selectaţi tot

            self.hpPercentxtSetPosition(200 + 7*self.nameLength-205, 13)
            self.hpPercenttxt.Show()
Tot in functia aceasta cautati randul :

Cod: Selectaţi tot

self.hpGauge.SetPercentage(hpPercentage, 100)
si sub el adaugati :

Cod: Selectaţi tot

        self.hpPercenttxt.SetText("%d%%" % (hpPercentage))


[Sursa=]metin2dev.org[/Sursa]
Avatar utilizator
Filipino
Metin Master

Metin Master
Mesaje: 2789
Membru din: 03 Sep 2014, 21:02
Server: ▬▬▬▬▬▬
Aprecieri: 39  
Mulţumiri: 785  
Discord: Copiază ID
Medalii

Mai este postat!
Verificati inainte sa postati!

[ Mesaj scris via Android ] Imagine
Imagine
Afișează semnătura
Închis
Răspunsuri
0
Vizualizări
102
Răspunsuri
2
Vizualizări
489
Răspunsuri
0
Vizualizări
64

Înapoi la “Arhivă”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 3 vizitatori