當前位置: 首頁>>代碼示例>>Python>>正文


Python DNAUtil.dgiExtractString8方法代碼示例

本文整理匯總了Python中DNAUtil.dgiExtractString8方法的典型用法代碼示例。如果您正苦於以下問題:Python DNAUtil.dgiExtractString8方法的具體用法?Python DNAUtil.dgiExtractString8怎麽用?Python DNAUtil.dgiExtractString8使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DNAUtil的用法示例。


在下文中一共展示了DNAUtil.dgiExtractString8方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: makeFromDGI

# 需要導入模塊: import DNAUtil [as 別名]
# 或者: from DNAUtil import dgiExtractString8 [as 別名]
 def makeFromDGI(self, dgi):
     DNANode.DNANode.makeFromDGI(self, dgi)
     self.code = DNAUtil.dgiExtractString8(dgi)
     self.wallColor = DNAUtil.dgiExtractColor(dgi)
     self.title = DNAUtil.dgiExtractString8(dgi)
     self.article = DNAUtil.dgiExtractString8(dgi)
     self.buildingType = DNAUtil.dgiExtractString8(dgi)
開發者ID:nate97,項目名稱:src,代碼行數:9,代碼來源:DNALandmarkBuilding.py

示例2: handleNode

# 需要導入模塊: import DNAUtil [as 別名]
# 或者: from DNAUtil import dgiExtractString8 [as 別名]
 def handleNode(self, dgi, target = None):
     if target is None:
         return
     numNodes = dgi.getUint16()
     for _ in xrange(numNodes):
         code = DNAUtil.dgiExtractString8(dgi)
         file = DNAUtil.dgiExtractString8(dgi)
         node = DNAUtil.dgiExtractString8(dgi)
         np = NodePath(loader.pdnaModel(file))
         if node:
             newNode = np.find('**/' + node).copyTo(NodePath())
             np.removeNode()
             np = newNode
         np.setTag('DNACode', code)
         np.setTag('DNARoot', node)
         target(np, code)
開發者ID:CalebSmith376,項目名稱:src,代碼行數:18,代碼來源:DNALoader.py

示例3: makeFromDGI

# 需要導入模塊: import DNAUtil [as 別名]
# 或者: from DNAUtil import dgiExtractString8 [as 別名]
 def makeFromDGI(self, dgi):
     DNANode.DNANode.makeFromDGI(self, dgi)
     self.code = DNAUtil.dgiExtractString8(dgi)
     self.color = DNAUtil.dgiExtractColor(dgi)
     self.width = dgi.getInt16() / 100.0
     self.height = dgi.getInt16() / 100.0
     self.bDefaultColor = dgi.getBool()
開發者ID:CalebSmith376,項目名稱:src,代碼行數:9,代碼來源:DNASignGraphic.py

示例4: makeFromDGI

# 需要導入模塊: import DNAUtil [as 別名]
# 或者: from DNAUtil import dgiExtractString8 [as 別名]
    def makeFromDGI(self, dgi, dnaStorage):
        DNAGroup.DNAGroup.makeFromDGI(self, dgi)

        numEdges = dgi.getUint16()
        for _ in xrange(numEdges):
            index = dgi.getUint16()
            endPoint = dgi.getUint16()
            self.addSuitEdge(dnaStorage.getSuitEdge(index, endPoint))

        numVisibles = dgi.getUint16()
        for _ in xrange(numVisibles):
            self.addVisible(DNAUtil.dgiExtractString8(dgi))

        numCells = dgi.getUint16()
        for _ in xrange(numCells):
            w = dgi.getUint8()
            h = dgi.getUint8()
            x, y, z = [dgi.getInt32() / 100.0 for i in xrange(3)]
            self.addBattleCell(DNABattleCell.DNABattleCell(w, h, LVector3f(x, y, z)))
開發者ID:CalebSmith376,項目名稱:src,代碼行數:21,代碼來源:DNAVisGroup.py

示例5: makeFromDGI

# 需要導入模塊: import DNAUtil [as 別名]
# 或者: from DNAUtil import dgiExtractString8 [as 別名]
 def makeFromDGI(self, dgi):
     DNAGroup.DNAGroup.makeFromDGI(self, dgi)
     self.code = DNAUtil.dgiExtractString8(dgi)
     self.color = DNAUtil.dgiExtractColor(dgi)
開發者ID:nate97,項目名稱:src,代碼行數:6,代碼來源:DNADoor.py

示例6: makeFromDGI

# 需要導入模塊: import DNAUtil [as 別名]
# 或者: from DNAUtil import dgiExtractString8 [as 別名]
 def makeFromDGI(self, dgi):
     DNAGroup.DNAGroup.makeFromDGI(self, dgi)
     self.code = DNAUtil.dgiExtractString8(dgi)
     self.color = DNAUtil.dgiExtractColor(dgi)
     self.windowCount = dgi.getUint8()
開發者ID:CalebSmith376,項目名稱:src,代碼行數:7,代碼來源:DNAWindows.py

示例7: makeFromDGI

# 需要導入模塊: import DNAUtil [as 別名]
# 或者: from DNAUtil import dgiExtractString8 [as 別名]
 def makeFromDGI(self, dgi):
     DNALandmarkBuilding.DNALandmarkBuilding.makeFromDGI(self, dgi)
     self.animName = DNAUtil.dgiExtractString8(dgi)
開發者ID:nate97,項目名稱:src,代碼行數:5,代碼來源:DNAAnimBuilding.py

示例8: handleStorageData

# 需要導入模塊: import DNAUtil [as 別名]
# 或者: from DNAUtil import dgiExtractString8 [as 別名]
    def handleStorageData(self, dgi):
        # Catalog Codes
        numRoots = dgi.getUint16()
        for _ in xrange(numRoots):
            root = DNAUtil.dgiExtractString8(dgi)
            numCodes = dgi.getUint8()
            for i in xrange(numCodes):
                code = DNAUtil.dgiExtractString8(dgi)
                self.dnaStorage.storeCatalogCode(root, code)

        # Textures
        numTextures = dgi.getUint16()
        for _ in xrange(numTextures):
            code = DNAUtil.dgiExtractString8(dgi)
            filename = DNAUtil.dgiExtractString8(dgi)
            self.dnaStorage.storeTexture(code, loader.pdnaTexture(filename, okMissing=True))

        # Fonts
        numFonts = dgi.getUint16()
        for _ in xrange(numFonts):
            code = DNAUtil.dgiExtractString8(dgi)
            filename = DNAUtil.dgiExtractString8(dgi)
            self.dnaStorage.storeFont(code, loader.pdnaFont(filename))

        # Nodes
        self.handleNode(dgi, target = self.dnaStorage.storeNode)
        self.handleNode(dgi, target = self.dnaStorage.storeHoodNode)
        self.handleNode(dgi, target = self.dnaStorage.storePlaceNode)

        # Blocks
        numBlocks = dgi.getUint16()
        for _ in xrange(numBlocks):
            number = dgi.getUint8()
            zone = dgi.getUint16()
            title = DNAUtil.dgiExtractString8(dgi)
            article = DNAUtil.dgiExtractString8(dgi)
            bldgType = DNAUtil.dgiExtractString8(dgi)
            self.dnaStorage.storeBlock(number, title, article, bldgType, zone)

        # Suit Points
        numPoints = dgi.getUint16()
        for _ in xrange(numPoints):
            index = dgi.getUint16()
            pointType = dgi.getUint8()
            x, y, z = (dgi.getInt32() / 100.0 for i in xrange(3))
            graph = dgi.getUint8()
            landmarkBuildingIndex = dgi.getInt8()
            self.dnaStorage.storeSuitPoint(DNASuitPoint.DNASuitPoint(index, pointType, LVector3f(x, y, z), landmarkBuildingIndex))

        # Suit Edges
        numEdges = dgi.getUint16()
        for _ in xrange(numEdges):
            index = dgi.getUint16()
            numPoints = dgi.getUint16()
            for i in xrange(numPoints):
                endPoint = dgi.getUint16()
                zoneId = dgi.getUint16()
                self.dnaStorage.storeSuitEdge(index, endPoint, zoneId)

        # Battle Cells
        numCells = dgi.getUint16()
        for _ in xrange(numCells):
            w = dgi.getUint8()
            h = dgi.getUint8()
            x, y, z = (dgi.getInt32() / 100.0 for i in xrange(3))
            self.dnaStorage.storeBattleCell(DNABattleCell.DNABattleCell(w, h, LVector3f(x, y, z)))
開發者ID:CalebSmith376,項目名稱:src,代碼行數:68,代碼來源:DNALoader.py


注:本文中的DNAUtil.dgiExtractString8方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。