当前位置: 首页>>代码示例>>Python>>正文


Python Block.__init__方法代码示例

本文整理汇总了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
开发者ID:BGCX067,项目名称:fairy-with-a-shotgun-git,代码行数:28,代码来源:Enemy.py

示例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 = []
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:12,代码来源:BootBlock.py

示例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()
开发者ID:agakax,项目名称:arkanoid,代码行数:12,代码来源:IndestructibleBlock.py

示例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
开发者ID:,项目名称:,代码行数:6,代码来源:

示例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)
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:4,代码来源:BitmapExtBlock.py

示例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
开发者ID:KRHS-GameProgramming-2014,项目名称:survival-island,代码行数:6,代码来源:LevelChange.py

示例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")
开发者ID:BentleyJOakes,项目名称:SourceToSimulink,代码行数:6,代码来源:FUNCTION_DECL.py

示例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)
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:4,代码来源:BitmapBlock.py

示例9: __init__

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import __init__ [as 别名]
 def __init__(self, image, pos):
     Block.__init__(self, image, pos)
开发者ID:KRHS-GameProgramming-2014,项目名称:survival-island,代码行数:4,代码来源:HardBlock.py

示例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)
开发者ID:BGCX067,项目名称:fairy-with-a-shotgun-git,代码行数:6,代码来源:Money.py

示例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)
开发者ID:lab313ru,项目名称:amitools,代码行数:4,代码来源:UserDirBlock.py

示例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)
开发者ID:BGCX067,项目名称:fairy-with-a-shotgun-git,代码行数:4,代码来源:HardBlock.py

示例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)
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:4,代码来源:FileDataBlock.py

示例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
开发者ID:KRHS-GameProgramming-2015,项目名称:Plane-Game,代码行数:5,代码来源:Button.py

示例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")
开发者ID:BentleyJOakes,项目名称:SourceToSimulink,代码行数:5,代码来源:DECL_REF_EXPR.py


注:本文中的Block.Block.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。