コード例 #1
0
def initCharacterBehavior():
    '''
    角色行为树总控制
    '''
    npcList = CharacterHandle.getCharacterIdList()
    npcList.remove('0')
    for npc in npcList:
        characterOccupationJudge(npc)
コード例 #2
0
def seeCharacterList_func(oldPanel):
    maxPage = getCharacterListPageMax()
    inputS = []
    seeCharacterListPanelInput = SeeCharacterListPanel.seeCharacterListPanel(
        maxPage)
    startId = len(seeCharacterListPanelInput)
    inputS = inputS + seeCharacterListPanelInput
    askForSeeCharacterListPanelInput = SeeCharacterListPanel.askForSeeCharacterListPanel(
        startId)
    inputS = inputS + askForSeeCharacterListPanelInput
    yrn = GameInit.askfor_All(inputS)
    yrn = str(yrn)
    characterIdList = CharacterHandle.getCharacterIdList()
    pageId = int(CacheContorl.panelState['SeeCharacterListPanel'])
    if yrn == str(startId):
        if pageId == 0:
            CacheContorl.panelState['SeeCharacterListPanel'] = str(maxPage)
            seeCharacterList_func(oldPanel)
        else:
            pageId = str(pageId - 1)
            CacheContorl.panelState['SeeCharacterListPanel'] = pageId
            seeCharacterList_func(oldPanel)
    elif yrn == str(startId + 1):
        if oldPanel == 'MainFramePanel':
            import script.Flow.Main as mainframe
            CacheContorl.characterData['characterId'] = '0'
            CacheContorl.panelState['SeeCharacterListPanel'] = '0'
            mainframe.mainFrame_func()
        else:
            pass
    elif yrn == str(startId + 2):
        if pageId == maxPage:
            CacheContorl.panelState['SeeCharacterListPanel'] = '0'
            seeCharacterList_func(oldPanel)
        else:
            pageId = str(pageId + 1)
            CacheContorl.panelState['SeeCharacterListPanel'] = pageId
            seeCharacterList_func(oldPanel)
    elif yrn in characterIdList:
        yrn = str(int(yrn) + characterPageShow * pageId)
        CacheContorl.characterData['characterId'] = yrn
        from script.Flow import SeeCharacterAttr
        SeeCharacterAttr.seeAttrOnEveryTime_func('SeeCharacterListPanel',
                                                 oldPanel)
コード例 #3
0
 def initCharacterBehavior(self):
     npcList = CharacterHandle.getCharacterIdList()
     npcList.remove('0')
     for npc in npcList:
         self.characterOccupationJudge(npc)