def CreateCharacter(self): if -1 != self.reservingRaceIndex: return textName = self.editCharacterName.GetText() if False == self.__CheckCreateCharacter(textName): return if musicInfo.selectMusic != "": snd.FadeLimitOutMusic("BGM/"+musicInfo.selectMusic, systemSetting.GetMusicVolume()*0.05) self.DisableWindow() chr_id = self.__GetSlotChrID(self.gender, self.slot) chr.SelectInstance(chr_id) self.reservingRaceIndex = chr.GetRace() self.reservingShapeIndex = self.shapeList[self.gender][self.slot] self.reservingStartTime = app.GetTime() for eachSlot in xrange(SLOT_COUNT[self.gender]): sel_id = self.__GetSlotChrID(self.gender, eachSlot) chr.SelectInstance(sel_id) if eachSlot == self.slot: chr.PushOnceMotion(chr.MOTION_INTRO_SELECTED) else: chr.PushOnceMotion(chr.MOTION_INTRO_NOT_SELECTED)
def StartGame(self): if self.sendedChangeNamePacket: return if self.changeNameFlag: self.OpenChangeNameDialog() return if -1 != self.startIndex: return if musicInfo.selectMusic != "": snd.FadeLimitOutMusic("BGM/" + musicInfo.selectMusic, systemSetting.GetMusicVolume() * 0.05) self.btnStart.SetUp() self.btnCreate.SetUp() self.btnDelete.SetUp() self.btnExit.SetUp() self.btnLeft.SetUp() self.btnRight.SetUp() self.btnStart.Disable() self.btnCreate.Disable() self.btnDelete.Disable() self.btnExit.Disable() self.btnLeft.Disable() self.btnRight.Disable() self.dlgQuestion.Hide() self.stream.SetCharacterSlot(self.slot) self.startIndex = self.slot self.startReservingTime = app.GetTime() for i in xrange(self.SLOT_COUNT): if FALSE == chr.HasInstance(i): continue chr.SelectInstance(i) if i == self.slot: self.slot = self.slot chr.PushOnceMotion(chr.MOTION_INTRO_SELECTED, 0.1) continue chr.PushOnceMotion(chr.MOTION_INTRO_NOT_SELECTED, 0.1)
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)