public void Init(bool isLocalPlayer, TeamCode teamCode, int number, string nickName, float currentHP, float maxHP, bool isDead, int killCount, int deadCount, System.Action <int, Vector3, float> moveCallback) { Logger.Debug("[Player] Init number = " + number + " / name = " + nickName); this.isLocalPlayer = isLocalPlayer; this.teamCode = teamCode; this.number = number; this.nickName = nickName; this.isDead = isDead; this.killCount = killCount; this.deadCount = deadCount; if (this.isLocalPlayer) { this.headerUI.gameObject.SetActive(false); UIManager.inst.hud.SetName(nickName); } else { this.headerUI.SetCamera(CameraController.inst.playerCamera.GetCamera()); this.headerUI.gameObject.SetActive(true); this.headerUI.SetNickName(nickName); this.headerUI.SetTeamCode(teamCode); } UpdateHP(currentHP, maxHP); AttachWeapon(number, "Rifle");//최초 라이플을 들고있도록 this.actionController.Init(this.animationController, this.transform, number, isLocalPlayer, isDead, moveCallback); this.actionController.SetLocalPlayer(isLocalPlayer); }
public void SetTeamCode(TeamCode teamCode) { if (teamCode == TeamCode.NONE) { return; } this.teamCode.text = string.Format("-----{0}-----", teamCode.GetTeamName()); this.teamCode.color = teamCode.GetColor(); }
public static Color GetColor(this TeamCode teamType) { switch (teamType) { case TeamCode.RED: return(Color.red); case TeamCode.BLUE: return(Color.blue); } return(Color.white); }
public Vector3 GetRespawnZone(TeamCode teamCode) { switch (teamCode) { case TeamCode.BLUE: return(GetBlueZone()); case TeamCode.RED: return(GetRedZone()); } return(GetWaitingZone()); }
public async Task <Team> GetTeam(string teamCode) { var code = new TeamCode(teamCode); var team = await this.teamRepository.FindByCodeAsync(code); if (team == null) { throw new NotFoundException(teamCode, typeof(Team)); } return(team); }
public static string GetTeamName(this TeamCode teamType) { switch (teamType) { case TeamCode.RED: return("Red"); case TeamCode.BLUE: return("Blue"); } return(""); }
public void AssignTeamCode(bool isLocalPlayer, TeamCode teamCode) { this.teamCode = teamCode; if (this.weapon != null) { this.weapon.SetTeamCode(teamCode); } if (isLocalPlayer == false) { this.headerUI.SetTeamCode(teamCode); } }
public async Task <Team> UpdateTeam(UpdateTeamDto dto) { var domainTeamCode = new TeamCode(dto.TeamCode); var team = await this.teamRepository.FindByCodeAsync(domainTeamCode); if (team == null) { throw new NotFoundException(dto.TeamCode, typeof(Team)); } team.ChangeTeamData(dto); return(await this.teamRepository.Update(team)); }
public async Task <Team> UpdateTeamJpin(string teamCode, string teamJpin) { var domainTeamCode = new TeamCode(teamCode); var team = await this.teamRepository.FindByCodeAsync(domainTeamCode); if (team == null) { throw new NotFoundException(teamCode, typeof(Team)); } team.ChangeTeamJpin(teamJpin); var changed = await this.teamRepository.Update(team); return(changed); }
public async Task <string> UpdateTeamMailAddress(string teamCode, string mailAddress) { var domainTeamCode = new TeamCode(teamCode); var team = await this.teamRepository.FindByCodeAsync(domainTeamCode); if (team == null) { throw new NotFoundException(teamCode, typeof(Team)); } var originalMailAddress = team.RepresentativeEmailAddress; team.ChangeRepresentativeEmailAddress(mailAddress); await this.teamRepository.Update(team); return(originalMailAddress); }
/// <summary> /// エントリー詳細の新しいインスタンスを生成します。 /// </summary> /// <param name="teamCode">団体登録番号。</param> /// <param name="teamName">団体名。</param> /// <param name="teamAbbreviatedName">団体名略称。</param> /// <param name="playerCode">登録番号。</param> /// <param name="playerFamilyName">姓。</param> /// <param name="playerFirstName">名。</param> /// <param name="point">ポイント。</param> public EntryPlayer( TeamCode teamCode, TeamName teamName, TeamAbbreviatedName teamAbbreviatedName, PlayerCode playerCode, PlayerFamilyName playerFamilyName, PlayerFirstName playerFirstName, Point point) { this.TeamCode = teamCode; this.TeamName = teamName; this.TeamAbbreviatedName = teamAbbreviatedName; this.PlayerCode = playerCode; this.PlayerFamilyName = playerFamilyName; this.PlayerFirstName = playerFirstName; this.Point = point; }
public int GetPlayerCount(TeamCode teamCode) { int count = 0; if (this.localPlayer.IsSameTeam(teamCode)) { count++; } this.remotePlayers.ForEach(x => { if (x.IsSameTeam(teamCode)) { count++; } ; }); return(count); }
public bool IsSameTeam(TeamCode teamCode) { return(this.teamCode == teamCode); }
public Color getTeamColor(TeamCode teamCode) { return(TeamColor[(int)teamCode]); }
public override void _Ready() { base._Ready(); CurrentTeamCode = TeamCode.NEUTRAL; }
public void SetMyTeamCode(TeamCode teamCode) { this.myTeamCode.text = teamCode.GetTeamName(); this.myTeamCode.color = teamCode.GetColor(); }
public void SetTeamCode(TeamCode teamCode) { this.ownerTeamCode = teamCode; }
public void Init(int ownerPlayerNumber, TeamCode teamCode) { Logger.Debug("[Weapon] Init : ownerPlayerNumber = " + ownerPlayerNumber); this.ownerPlayerNumber = ownerPlayerNumber; this.ownerTeamCode = teamCode; }