本文整理汇总了Python中Block.Block.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Block.__init__方法的具体用法?Python Block.__init__怎么用?Python Block.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Block.Block
的用法示例。
在下文中一共展示了Block.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, image, pos = (0,0), blocksize = [50,50], screensize = [800,600]):
Block.__init__(self, image, pos, blocksize)
self.maxSpeed = blocksize[0]/14.0
self.screensize = screensize
self.living = True
self.detectRange = 100
self.seePlayer = False
self.headingx = "right"
self.headingy = "none"
self.directionCount = 0
self.realx = pos[0]
self.realy = pos[1]
self.x = screensize[0]/2
self.y = screensize[1]/2
self.x = pos[0]
self.y = pos[1]
self.g = blocksize[0]/10
self.offsetx = 0
self.offsety = 0
self.jumpSpeed = 0
self.jumpSpeedMax = 50
self.fallSpeedMax = int(blocksize[0]/2) -2
self.onfloor = False
self.floor = screensize[1]
self.touchFloor = False
self.turn = 0
示例2: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, blkdev, blk_num=0):
Block.__init__(self, blkdev, blk_num)
self.dos_type = None
self.got_root_blk = None
self.got_chksum = 0
self.calc_chksum = 0
self.boot_code = None
self.num_extra = self.blkdev.bootblocks - 1
self.max_boot_code = self.blkdev.bootblocks * self.blkdev.block_bytes - 12
self.extra_blks = []
示例3: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, gameEngine, base, position, blockId):
Block.__init__(self, gameEngine, base)
self._durability = -1
self._points = 0
self.loadModel('models/cone_wo2')
self.setModelTexture('textures/bricks.jpg')
self.setModelParameters(position)
self.createHitCollider(blockId)
self.createRay()
self.setFallCollideHandling()
示例4: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, blkdev, blk_num, is_type, is_sub_type, is_longname=False):
Block.__init__(self, blkdev, blk_num, is_type, is_sub_type)
self.is_longname = is_longname
self.comment_block_id = 0
示例5: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, blkdev, blk_num):
Block.__init__(self, blkdev, blk_num)
示例6: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self,img, pos, size):
Block.__init__(self, img, pos, size)
self.img = img
self.kind = kind
示例7: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, node):
Block.__init__(self, node)
self.name = node.get("spelling")
self.return_type = node.get("TokenKind.KEYWORD")
示例8: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, blkdev, blk_num):
Block.__init__(self, blkdev, blk_num, chk_loc=0)
示例9: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, image, pos):
Block.__init__(self, image, pos)
示例10: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, value, pos=(0, 0), blocksize=[50, 50]):
self.value = value
image = "rsc/blocks/money.png"
Block.__init__(self, image, pos, blocksize)
示例11: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, blkdev, blk_num):
Block.__init__(self, blkdev, blk_num, is_type=Block.T_SHORT, is_sub_type=Block.ST_USERDIR)
示例12: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, image, pos = (0,0), blocksize = [50,50]):
Block.__init__(self, image, pos, blocksize)
示例13: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, blkdev, blk_num):
Block.__init__(self, blkdev, blk_num, is_type=Block.T_DATA)
示例14: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, image, symbol, previousLine, pos=[0,0], blockSize = [50,50]):
Block.__init__(self, image, symbol, pos, blockSize)
self.attribute = previousLine
示例15: __init__
# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
def __init__(self, node):
Block.__init__(self, node)
self.name = node.get("TokenKind.IDENTIFIER")