def traverse(self, recursive=True, verbose=False): packer = DNAGroup.traverse(self, recursive=False, verbose=verbose) packer.name = 'DNACornice' # Override the name for debugging. packer.pack('code', self.code, STRING) packer.packColor('color', *self.color) return packer
def traverse(self, recursive=True, verbose=False): packer = DNAGroup.traverse(self, recursive=False, verbose=verbose) packer.name = 'DNAWindows' # Override the name for debugging. packer.pack('code', self.code, STRING) packer.packColor('color', *self.color) packer.pack('window count', self.windowCount, UINT8) return packer
def traverse(self, recursive=True, verbose=False): packer = DNAGroup.traverse(self, recursive=False, verbose=verbose) packer.name = 'DNANode' # Override the name for debugging. for component in self.pos: packer.pack('position', int(component * 100), INT32) for component in self.hpr: packer.pack('rotation', int(component * 100), INT32) for component in self.scale: packer.pack('scale', int(component * 100), UINT16) if recursive: packer += self.traverseChildren(verbose=verbose) return packer
def traverse(self, recursive=True, verbose=False): packer = DNAGroup.traverse(self, recursive=False, verbose=verbose) packer.name = 'DNAVisGroup' # Override the name for debugging. packer.pack('suit edge count', len(self.suitEdges), UINT16) for edge in self.suitEdges: startPointIndex = edge.startPoint.index packer.pack('start point index', startPointIndex, UINT16) endPointIndex = edge.endPoint.index packer.pack('end point index', endPointIndex, UINT16) packer.pack('visible count', len(self.visibles), UINT16) for visible in self.visibles: packer.pack('visible', visible, STRING) packer.pack('battle cell count', len(self.battleCells), UINT16) for cell in self.battleCells: packer.pack('width', cell.width, UINT8) packer.pack('height', cell.height, UINT8) for component in cell.pos: packer.pack('position', int(component * 100), INT32) if recursive: packer += self.traverseChildren(verbose=verbose) return packer
def __init__(self, name): DNAGroup.__init__(self, name) self.code = '' self.color = (1, 1, 1, 1)
def __init__(self, name="root", dnaStore=None): DNAGroup.__init__(self, name) self.dnaStore = dnaStore
def __init__(self, name='root', dnaStore=None): DNAGroup.__init__(self, name) self.dnaStore = dnaStore
def p_dnagroupdef(p): name = p[2] p[0] = DNAGroup(name) p.parser.parentGroup.add(p[0]) p[0].setParent(p.parser.parentGroup) p.parser.parentGroup = p[0]
def __init__(self, name): DNAGroup.__init__(self, name) self.code = '' self.color = (1, 1, 1, 1) self.windowCount = 1
def __init__(self, name): DNAGroup.__init__(self, name) self.pos = (0, 0, 0) self.hpr = (0, 0, 0) self.scale = (1, 1, 1)
def __init__(self, name): DNAGroup.__init__(self, name) self.visibles = [] self.suitEdges = [] self.battleCells = []