本文整理汇总了Python中team.Team.create方法的典型用法代码示例。如果您正苦于以下问题:Python Team.create方法的具体用法?Python Team.create怎么用?Python Team.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类team.Team
的用法示例。
在下文中一共展示了Team.create方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: teamCreate
# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import create [as 别名]
def teamCreate(self):
newTeam = Team()
newTeam.create(self)
self.iscaption=1
self.team=newTeam # 是指向队伍实例吧.? S 那边只能 self.team=newTeam.name
self.teamName=newTeam.name
draw.drawTeamMember(newTeam)
print "创建队伍:" ,self.team
teamManager.add(newTeam)
playerManager.add(self)
示例2: gs2cOtherTeamCreate
# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import create [as 别名]
def gs2cOtherTeamCreate(player,packet):
playerName = packet.unpackString()
teamName= packet.unpackString()
playerGeted = playerManager.getPlayerByName(playerName)
newTeam = Team()
newTeam.create(playerGeted)
playerGeted.iscaption =1
playerGeted.team=newTeam.name
playerGeted.teamName=teamName
teamManager.add(newTeam)
playerManager.add(playerGeted)
示例3: inviteAnswerReply
# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import create [as 别名]
def inviteAnswerReply(self, answer, members, inviter, invitee):
from player import localPlayer
from team import Team
from player_manager import playerManager
from team_manager import teamManager
from draw_ import draw
if localPlayer.name is invitee.name:
newTeam = Team()
newTeam.create(inviter)
for member in members:
newTeam.add(member)
#更新玩家和team 数据 idea-->定义一个“更新”类,用@classmethod?
invitee.team = newTeam
inviter.team = newTeam
playerManager.add(inviter)
playerManager.add(invitee)
teamManager.add(newTeam)
#画出队伍成员
draw.disDrawTeamMember()
draw.drawTeamMember(newTeam)
elif localPlayer.name is inviter.name:
inviter.team = teamManager.get(inviter)
inviter.team.add(invitee)
#更新玩家和team 数据
playerManager.add(inviter)
teamManager.add(inviter.team)
#画出队伍成员
draw.disDrawTeamMember()
draw.drawTeamMember(inviter.team)
else:# 其他队员
localPlayer.team.add(invitee)
#更新玩家和team 数据
playerManager.add(localPlayer)
teamManager.add(localPlayer.team)
#画出队伍成员
draw.disDrawTeamMember()
draw.drawTeamMember(localPlayer.team)