本文整理汇总了Python中Avatar.Avatar.heal方法的典型用法代码示例。如果您正苦于以下问题:Python Avatar.heal方法的具体用法?Python Avatar.heal怎么用?Python Avatar.heal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Avatar.Avatar
的用法示例。
在下文中一共展示了Avatar.heal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from Avatar import Avatar [as 别名]
# 或者: from Avatar.Avatar import heal [as 别名]
# Fill the queue with init requests
for l in range(0,7):
q.put( pickle.dumps( ["init",-1,[avs[i],avs[i+1],avs[i+2]]] ) )
i = i +3
#Fiill the queue with updateBot requests
av = Avatar("av19", [200,200])
av.stance = Stance("Fire",random.choice(("Burning","Piercing")))
#av.heal = random.choice((True,False))
q.put( pickle.dumps( ["updateBot", -1, [av]]))
p = [500,300]
for l in range(0,10):
p = [p[0]+random.randint(-8,8),p[1]+random.randint(-8,8)]
a = Avatar("av20",p)
if l ==1:
a.heal = True
else:
a.heal = False
print "updateBot queueing: " ,a
a.stance = Stance("Fire",random.choice(("Burning","Piercing")))
q.put( pickle.dumps( ["updateBot", -1, [a] ] ) )
#Fill the queue with drawView requests
q.put(pickle.dumps(("drawView", -1, [View((200,200),225,20)])))
for l in range(0,10):
v = View((random.randint(0,1000),random.randint(0,650)), random.choice((45,135,225,315)), random.randint(1,45))
q.put(pickle.dumps(("drawView", -1, [v])))
#Fill the queue with drawShot requests
for l in range(0,20):
orig = []
s = Shot( (random.randint(0,800),random.randint(0,600)) , (random.randint(0,800),random.randint(0,600)), random.choice(("Burning", "Piercing")) )