protected override Player _GenerateTeamMember(Config.TeamMember member, string name) { Team team = (member.team == Team.Side.eAway ? m_awayTeam : m_homeTeam); Player player = GameSystem.Instance.mClient.mPlayerManager.CreatePlayer(member.roleInfo, team); player.m_config = member; return(player); }
public Player CreatePlayer(Config.TeamMember mem) { if ((FightStatus)mem.pos == FightStatus.FS_MAIN) { Player role = MainPlayer.Instance.GetRole(uint.Parse(mem.id)); if (role != null) { mem.roleInfo = role.m_roleInfo; } } Player player = _GeneratePlayerData(mem); if ((FightStatus)mem.pos == FightStatus.FS_MAIN) { player.m_InfoVisualizer = new PlayerInfoVisualizer(player); } player.m_team.m_role = GameMatch.MatchRole.eOffense; return(player); }
public Player CreatePlayer(Config.TeamMember mem, bool rival) { if ((FightStatus)mem.pos != FightStatus.FS_MAIN) { mem.team = practise_behaviour.GetNPCSide(); } //if (mem.id == MainPlayer.Instance.CaptainID.ToString()) // mem.roleInfo = MainPlayer.Instance.Captain.m_roleInfo; Player player = _GeneratePlayerData(mem, rival); CreateTeamMember(player); if ((FightStatus)mem.pos == FightStatus.FS_MAIN) { player.operMode = Player.OperMode.Input; } player.m_catchHelper = new CatchHelper(player); player.m_catchHelper.ExtractBallLocomotion(); player.m_StateMachine.SetState(PlayerState.State.eStand, true); return(player); }
public static void SetConfig(ref GameMatch.Config config) { int pos = 1; foreach (FightRole role in MainPlayer.Instance.SquadInfo) { Config.TeamMember mem = new Config.TeamMember(); mem.id = role.role_id.ToString(); mem.isRobot = false; mem.pos = pos++; mem.roleInfo = MainPlayer.Instance.GetRole2(role.role_id); mem.team = Team.Side.eHome; mem.team_name = MainPlayer.Instance.Name; if (mem.pos == 1) { config.MainRole = mem; } else { config.NPCs.Insert(mem.pos - 2, mem); } } config.leagueType = LeagueType.ePractise; }