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


Python Person.setWhichChar方法代码示例

本文整理汇总了Python中Person.Person.setWhichChar方法的典型用法代码示例。如果您正苦于以下问题:Python Person.setWhichChar方法的具体用法?Python Person.setWhichChar怎么用?Python Person.setWhichChar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Person.Person的用法示例。


在下文中一共展示了Person.setWhichChar方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Person

# 需要导入模块: from Person import Person [as 别名]
# 或者: from Person.Person import setWhichChar [as 别名]
char = Person()
char.sizeOfload(4)

char.load('queen.png',[(0,0,30,50),(35,0, 30, 50),(65,0,30,50)],3,'front','king',-1,True,frames)
char.load('queen.png',[(0,h_left,30,height),(35,h_left, 30, height),(65,h_left,30,height)],3,'left','king',-1,True,frames)
char.load('queen.png',[(0,h_right,30,height),(35,h_right, 30, height),(65,h_right,30,height)],3,'right','king',-1,True,frames)
char.load('queen.png',[(0,h_back,30,height),(35,h_back, 30, height),(65,h_back,30,height)],3,'back','king',-1,True,frames)

char.sizeOfload(4)

char.load('queen.png',[(numb + 0, yVal*4,30,50),(numb + 35, yVal*4, 30, 50),( numb + 65, yVal*4,30,50)],3,'front','armor',-1,True,frames)
char.load('queen.png',[(numb + 0, yVal*5,30,50),(numb + 35, yVal*5, 30, 50),( numb + 65, yVal*5,30,50)],3,'left','armor',-1,True,frames)
char.load('queen.png',[(numb + 0, yVal*6,30,50),(numb + 35, yVal*6, 30, 50),( numb + 65, yVal*6,30,50)],3,'right','armor',-1,True,frames)
char.load('queen.png',[(numb + 0, yVal*7,30,50),(numb + 35, yVal*7, 30, 50),( numb + 65, yVal*7,30,50)],3,'back','armor',-1,True,frames)

char.setWhichChar('armor')
char.setX(42)
char.setY(320)


tris = Shapes(center,points,tempRect,imageSquare,'tower.png')


#trit = Shape(centert,point1t,point2t,rectt,rectt,"left","tower.png")
trit = Shape(centert,point1t,point2t,tempRect,(0,0,0,0),"right","tower.png")

# sq = Button(250,50)

keyboard = Keyboard()
mouse = Mouse()
inputted = Input()
开发者ID:MichaelHaendler,项目名称:python_video_game1,代码行数:33,代码来源:Objs.py


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