Пример #1
0
    def OnUpdate(self):
        chr.Update()

        for i in xrange(4):
            self.curGauge[i] += (self.destGauge[i] - self.curGauge[i]) / 10.0
            if abs(self.curGauge[i] - self.destGauge[i]) < 0.005:
                self.curGauge[i] = self.destGauge[i]
            self.GaugeList[i].SetPercentage(self.curGauge[i], 1.0)

        for i in xrange(self.CHARACTER_TYPE_COUNT):
            self.curNameAlpha[i] += (self.destNameAlpha[i] -
                                     self.curNameAlpha[i]) / 10.0
            self.NameList[i].SetAlpha(self.curNameAlpha[i])

        for i in xrange(self.SLOT_COUNT):

            if FALSE == chr.HasInstance(i):
                continue

            chr.SelectInstance(i)

            distance = 50.0
            rotRadian = self.curRotation[i] * (math.pi * 2) / 360.0
            x = distance * math.sin(rotRadian) + distance * math.cos(rotRadian)
            y = distance * math.cos(rotRadian) - distance * math.sin(rotRadian)
            chr.SetPixelPosition(int(x), int(y), 30)

            #####

            dir = app.GetRotatingDirection(self.destRotation[i],
                                           self.curRotation[i])
            rot = app.GetDegreeDifference(self.destRotation[i],
                                          self.curRotation[i])

            if app.DEGREE_DIRECTION_RIGHT == dir:
                self.curRotation[i] += rot / 10.0
            elif app.DEGREE_DIRECTION_LEFT == dir:
                self.curRotation[i] -= rot / 10.0

            self.curRotation[i] = (self.curRotation[i] + 360.0) % 360.0

        #######################################################
        if -1 != self.startIndex:

            ## Temporary
            ## BackGroundLoading이 지원 될때까지 임시로..
            if app.GetTime() - self.startReservingTime > 3.0:
                if FALSE == self.openLoadingFlag:
                    chrSlot = self.stream.GetCharacterSlot()
                    net.DirectEnter(chrSlot)
                    self.openLoadingFlag = TRUE

                    playTime = net.GetAccountCharacterSlotDataInteger(
                        self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME)

                    import player
                    player.SetPlayTime(playTime)
                    import chat
                    chat.Clear()  ## 들어갈때 Chat 을 초기화. 임시 Pos.
Пример #2
0
    def OnUpdate(self):
        chr.Update()

        for i in xrange(4):
            self.curGauge[i] += (self.destGauge[i] - self.curGauge[i]) / 10.0
            if abs(self.curGauge[i] - self.destGauge[i]) < 0.005:
                self.curGauge[i] = self.destGauge[i]
#			self.GaugeList[i].SetPercentage(self.curGauge[i], 1.0)
            self.GaugeList[i].SetPercentage(min(self.curGauge[i], 0.5), 0.5)

        for i in xrange(self.CHARACTER_TYPE_COUNT):
            self.curNameAlpha[i] += (self.destNameAlpha[i] -
                                     self.curNameAlpha[i]) / 10.0
            self.NameList[i].SetAlpha(self.curNameAlpha[i])

        for i in xrange(self.SLOT_COUNT):

            if FALSE == chr.HasInstance(i):
                continue

            chr.SelectInstance(i)

            #distance = 50.0
            #rotRadian = self.curRotation[i] * (math.pi*0) / 0.0
            #x = distance*math.sin(rotRadian) + distance*math.cos(rotRadian)
            #y = distance*math.cos(rotRadian) - distance*math.sin(rotRadian)
            #chr.SetPixelPosition(int(x), int(y), 50)

            #####

            #dir = app.GetRotatingDirection(self.destRotation[i], self.curRotation[i])
            #rot = app.GetDegreeDifference(self.destRotation[i], self.curRotation[i])

            #if app.DEGREE_DIRECTION_RIGHT == dir:
            #	self.curRotation[i] += rot / 0.0
            #elif app.DEGREE_DIRECTION_LEFT == dir:
            #	self.curRotation[i] -= rot / 0.0

            #self.curRotation[i] = (self.curRotation[i] + 0.0) % 0.0

        #######################################################
        if -1 != self.startIndex:

            ## Temporary
            ## BackGroundLoading이 지원 될때까지 임시로..
            if app.GetTime() - self.startReservingTime > 3.0:
                if FALSE == self.openLoadingFlag:
                    chrSlot = self.stream.GetCharacterSlot()
                    GFHhg54GHGhh45GHGH.DirectEnter(chrSlot)
                    self.openLoadingFlag = TRUE

                    playTime = GFHhg54GHGhh45GHGH.GetAccountCharacterSlotDataInteger(
                        self.slot,
                        GFHhg54GHGhh45GHGH.ACCOUNT_CHARACTER_SLOT_PLAYTIME)

                    import fgGHGjjFHJghjfFG1545gGG
                    fgGHGjjFHJghjfFG1545gGG.SetPlayTime(playTime)
                    import chat
                    chat.Clear()  ## 들어갈때 Chat 을 초기화. 임시 Pos.
Пример #3
0
	def OnUpdate(self):
		chr.Update()

		(xposEventSet, yposEventSet) = self.textBoard.GetGlobalPosition()
		event.UpdateEventSet(self.descIndex, xposEventSet+7, -(yposEventSet+7))
		self.descriptionBox.SetIndex(self.descIndex)

		for i in xrange(SLOT_COUNT[self.gender]):
			self.curNameAlpha[i] += (self.destNameAlpha[i] - self.curNameAlpha[i]) / 10.0
			self.NameList[self.gender][i].SetAlpha(self.curNameAlpha[i])

		for i in xrange(4):
			self.curGauge[i] += (self.destGauge[i] - self.curGauge[i]) / 10.0
			if abs(self.curGauge[i] - self.destGauge[i]) < 0.005:
				self.curGauge[i] = self.destGauge[i]
			self.GaugeList[i].SetPercentage(self.curGauge[i], 1.0)

		for page in xrange(PAGE_COUNT):
			for i in xrange(SLOT_COUNT[page]):
				chr.SelectInstance(self.__GetSlotChrID(page, i))

				distance = 50.0
				rotRadian = self.curRotation[i] * (math.pi*2) / 360.0
				x = distance*math.sin(rotRadian) + distance*math.cos(rotRadian)
				y = distance*math.cos(rotRadian) - distance*math.sin(rotRadian)
				chr.SetPixelPosition(int(x), int(y), 30)

				if abs(self.destRotation[i] - self.curRotation[i]) < 1.0:
					self.curRotation[i] = self.destRotation[i]

				dir = app.GetRotatingDirection(self.destRotation[i], self.curRotation[i])
				rot = app.GetDegreeDifference(self.destRotation[i], self.curRotation[i])

				if app.DEGREE_DIRECTION_RIGHT == dir:
					self.curRotation[i] += rot / 10.0
				elif app.DEGREE_DIRECTION_LEFT == dir:
					self.curRotation[i] -= rot / 10.0

				self.curRotation[i] = (self.curRotation[i] + 360.0) % 360.0

		###########################################################
		if -1 != self.reservingRaceIndex:
			if app.GetTime() - self.reservingStartTime >= 1.5:

				chrSlot=self.stream.GetCharacterSlot()
				textName = self.editCharacterName.GetText()
				raceIndex = self.reservingRaceIndex
				shapeIndex = self.reservingShapeIndex

				startStat = self.START_STAT[self.reservingRaceIndex]
				statCon = self.stat[0] - startStat[0]
				statInt = self.stat[1] - startStat[1]
				statStr = self.stat[2] - startStat[2]
				statDex = self.stat[3] - startStat[3]

				net.SendCreateCharacterPacket(chrSlot, textName, raceIndex, shapeIndex, statCon, statInt, statStr, statDex)

				self.reservingRaceIndex = -1
Пример #4
0
	def OnUpdate(self):
		chr.Update()

		for i in xrange(self.SLOT_COUNT):
			if FALSE == chr.HasInstance(i):
				continue
			chr.SelectInstance(i)

		if -1 != self.startIndex:
			if app.GetTime() - self.startReservingTime > 3.0:
				if False == self.openLoadingFlag:
					chrSlot=self.stream.GetCharacterSlot()
					net.DirectEnter(chrSlot)
					self.openLoadingFlag = True
					player.SetPlayTime(net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME))
					chat.Clear()
					
					intrologin.set_reg("%s_slot" % constInfo.LastAccount, "%d" % self.stream.GetCharacterSlot())
Пример #5
0
    def OnUpdate(self):
        chr.Update()

        for page in xrange(PAGE_COUNT):
            for i in xrange(SLOT_COUNT):
                chr.SelectInstance(self.__GetSlotChrID(page, i))
                chr.Show()

        if -1 != self.reservingRaceIndex:
            if app.GetTime() - self.reservingStartTime >= 1.5:

                chrSlot = self.stream.GetCharacterSlot()
                textName = self.editCharacterName.GetText()
                raceIndex = self.reservingRaceIndex
                shapeIndex = self.reservingShapeIndex

                net.SendCreateCharacterPacket(chrSlot, textName, raceIndex,
                                              shapeIndex, 0, 0, 0, 0)

                self.reservingRaceIndex = -1
Пример #6
0
	def OnUpdate(self):
		chr.Update()
		self.ToolTipProgress()

		(xposEventSet, yposEventSet) = self.textBoard.GetGlobalPosition()
		event.UpdateEventSet(self.descIndex, xposEventSet+7, -(yposEventSet+7))
		self.descriptionBox.SetIndex(self.descIndex)
		
		for i in xrange(len(self.NameList)):
			if self.job_id == i	: 
				self.NameList[i].SetAlpha(1)
			else :
				self.NameList[i].SetAlpha(0)
				
		for i in xrange(self.LEN_STATPOINT):
			self.GaugeList[i].SetPercentage(self.curGauge[i], 1.0)		
		
		if self.MotionStart and self.createSuccess and app.GetTime() - self.MotionTime >= 2.0 :
			self.MotionStart = False
			self.stream.SetSelectCharacterPhase()
			self.Hide()
    def OnUpdate(self):
        chr.Update()
        self.ToolTipProgress()

        if self.SelectEmpire:
            self.SelectEmpire = False
            self.stream.SetReselectEmpirePhase()
            self.Hide()

        if self.MotionStart and app.GetTime() - self.MotionTime >= 2.0:
            self.MotionStart = False
            ##기존 사용 그대로 들구옴##
            #print " Start Game "
            chrSlot = self.stream.GetCharacterSlot()

            #print "chrSlot = %s" % chrSlot
            if musicInfo.selectMusic != "":
                snd.FadeLimitOutMusic("BGM/" + musicInfo.selectMusic,
                                      systemSetting.GetMusicVolume() * 0.05)

            net.DirectEnter(chrSlot)
            playTime = net.GetAccountCharacterSlotDataInteger(
                chrSlot, net.ACCOUNT_CHARACTER_SLOT_PLAYTIME)

            import player
            player.SetPlayTime(playTime)
            import chat
            chat.Clear()

        (xposEventSet, yposEventSet) = self.textBoard.GetGlobalPosition()
        event.UpdateEventSet(self.descIndex, xposEventSet + 7,
                             -(yposEventSet + 7))
        self.descriptionBox.SetIndex(self.descIndex)

        for i in xrange(self.LEN_STATPOINT):
            self.GaugeList[i].SetPercentage(self.curGauge[i], 1.0)