本文整理匯總了Python中Avatar.Avatar.stance方法的典型用法代碼示例。如果您正苦於以下問題:Python Avatar.stance方法的具體用法?Python Avatar.stance怎麽用?Python Avatar.stance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Avatar.Avatar
的用法示例。
在下文中一共展示了Avatar.stance方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: ServerGui
# 需要導入模塊: from Avatar import Avatar [as 別名]
# 或者: from Avatar.Avatar import stance [as 別名]
self.botsDict[bot]= b
self.notificationsGroup.add(self.botsDict[bot])
x +=75
if __name__ == "__main__":
import Queue
gui = ServerGui()
q = Queue.Queue()
#Create a list of avatars to pull from
avs = []
for b in range(0,21):
a = "av" + str(b)
av = Avatar(a,(random.randint(0,800),random.randint(0,600)))
print "init queuing: ", av
av.stance = Stance("Fire",random.choice(("Burning","Piercing")))
avs.append(av)
i = 0
# 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)]