def OnUpdate(self): (xposEventSet, yposEventSet) = self.textBoard.GetGlobalPosition() event.UpdateEventSet(self.descIndex, xposEventSet+7, -(yposEventSet+7)) self.descriptionBox.SetIndex(self.descIndex) self.__UpdateAlpha(self.empireArea, self.empireAreaCurAlpha, self.empireAreaDestAlpha) self.__UpdateAlpha(self.empireAreaFlag, self.empireAreaFlagCurAlpha, self.empireAreaFlagDestAlpha) self.__UpdateAlpha(self.empireFlag, self.empireFlagCurAlpha, self.empireFlagDestAlpha)
def OnUpdate(self): if self.skin == self.SKIN_CINEMA: event.UpdateEventSet(self.descIndex, 50, -(wndMgr.GetScreenHeight() - 44)) # AUTO_RESIZE_BOARD elif self.skin == 3: if self.board: event.UpdateEventSet( self.descIndex, self.board.GetGlobalPosition()[0] + 20 + self.sx, -self.board.GetGlobalPosition()[1] - 20 - self.sy) event.SetEventSetWidth(self.descIndex, self.board.GetWidth() - 40) elif self.skin: if self.board: event.UpdateEventSet(self.descIndex, self.board.GetGlobalPosition()[0] + 20, -self.board.GetGlobalPosition()[1] - 20) event.SetEventSetWidth(self.descIndex, self.board.GetWidth() - 40) # END_OF_AUTO_RESIZE_BOARD else: event.UpdateEventSet(self.descIndex, 0, 0) if self.TITLE_STATE_NONE != self.titleState: curTime = app.GetTime() elapsedTime = app.GetTime() - self.titleShowTime if self.TITLE_STATE_APPEAR == self.titleState: self.imgTitle.SetAlpha(elapsedTime * 2) if elapsedTime > 0.5: self.titleState = self.TITLE_STATE_SHOW self.titleShowTime = curTime elif self.TITLE_STATE_SHOW == self.titleState: if elapsedTime > 1.0: self.titleState = self.TITLE_STATE_DISAPPEAR self.titleShowTime = curTime elif self.TITLE_STATE_DISAPPEAR == self.titleState: self.imgTitle.SetAlpha(1.0 - elapsedTime * 2) if elapsedTime > 0.5: self.titleState = self.TITLE_STATE_NONE self.titleShowTime = curTime
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
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)
def OnUpdate(self): (xposEventSet, yposEventSet) = self.textBoard.GetGlobalPosition() event.UpdateEventSet(self.descIndex, xposEventSet + 7, -(yposEventSet + 7 - (int(self.scrollPos) * 16))) self.descriptionBox.SetIndex(self.descIndex)