本文整理汇总了Python中b3.fake.FakeClient.team方法的典型用法代码示例。如果您正苦于以下问题:Python FakeClient.team方法的具体用法?Python FakeClient.team怎么用?Python FakeClient.team使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类b3.fake.FakeClient
的用法示例。
在下文中一共展示了FakeClient.team方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_PLAYER_CHAT_team
# 需要导入模块: from b3.fake import FakeClient [as 别名]
# 或者: from b3.fake.FakeClient import team [as 别名]
def test_PLAYER_CHAT_team(self): # 3
# GIVEN
player = FakeClient(self.parser, name="Pheonix", guid="76561198038608801")
player.connects("1")
self.clear_events()
player.team = 0 # ugly, until chiv team ids got converted into b3 team ids
# WHEN
self.parser.handlePacket(Packet.decode(
'\x00\x03\x00\x00\x00\x17\x01\x10\x00\x01\x04\xabk\xa1\x00\x00\x00\x07 sorry \x00\x00\x00\x00'))
# THEN
self.assert_has_event("EVT_CLIENT_TEAM_SAY", data='sorry', client=player)
示例2:
# 需要导入模块: from b3.fake import FakeClient [as 别名]
# 或者: from b3.fake.FakeClient import team [as 别名]
time.sleep(.5)
me.says('!ts disjoin')
time.sleep(.5)
me.says('!ts')
time.sleep(.5)
me.says('!ts join')
time.sleep(.5)
me.says('!tsauto on')
time.sleep(.5)
p.tsTellClient(tsclient['clid'], "Going to spec")
me.team = TEAM_SPEC
time.sleep(1)
p.tsTellClient(tsclient['clid'], "Going to blue team")
me.team = TEAM_BLUE
time.sleep(1)
p.tsTellClient(tsclient['clid'], "Going to red team")
me.team = TEAM_RED
time.sleep(1)
p.tsTellClient(tsclient['clid'], "Going in no team")
me.team = TEAM_FREE
time.sleep(1)
me.says('!tsauto off')