本文整理匯總了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")) )