// Token: 0x0600099E RID: 2462 RVA: 0x0003C5D8 File Offset: 0x0003A7D8 private Vector2 DoTeam(Rect position, TeamID teamID, Vector2 scroll, List <GameActorInfo> players) { GUI.BeginGroup(position); Color contentColor = GUI.contentColor; GUI.BeginGroup(new Rect(0f, 0f, position.width, 60f), GUIContent.none, BlueStonez.box_overlay); GUI.color = ((teamID != TeamID.BLUE) ? ColorScheme.HudTeamRed : ColorScheme.HudTeamBlue); if (teamID == TeamID.RED) { GUI.Label(new Rect(10f, 6f, 200f, 32f), teamID.ToString(), BlueStonez.label_interparkbold_32pt_left); GUI.Label(new Rect(10f, 34f, 200f, 18f), string.Format(LocalizedStrings.NPlayers, players.Count), BlueStonez.label_interparkbold_18pt_left); GUI.Label(new Rect(position.width - 215f, 8f, 200f, 48f), GameState.Current.ScoreRed.ToString(), BlueStonez.label_interparkbold_48pt_right); } else { GUI.Label(new Rect(15f, 8f, 200f, 48f), GameState.Current.ScoreBlue.ToString(), BlueStonez.label_interparkbold_48pt_left); GUI.Label(new Rect(position.width - 210f, 6f, 200f, 32f), teamID.ToString(), BlueStonez.label_interparkbold_32pt_right); GUI.Label(new Rect(position.width - 210f, 34f, 200f, 18f), string.Format(LocalizedStrings.NPlayers, players.Count), BlueStonez.label_interparkbold_18pt_right); } GUI.EndGroup(); GUI.color = contentColor; scroll = this.DoAllStats(new Rect(0f, 56f, position.width, position.height - 56f), scroll, players); GUI.EndGroup(); return(scroll); }
/// <summary> /// Initialises the class before Start. /// </summary> private void Awake() { transform.SetParent(GameManager.s_Singleton.transform); //m_TeamID = CurrentGame.Instance.gameDetail.GetTeamByIndex(transform.GetSiblingIndex()); todo re-enable m_TeamID = new ServerTeam(); m_TeamID.bankAccount = 0; m_TeamID.customColor = "#FF0000"; m_TeamID.teamName = "TEST TEAM"; m_TeamID.treasury = 0; name = TeamID.ToString(); }
public static void LoadPositionsTeam(IniDataSection sectionFile, TeamID teamId) { var section = sectionFile.GetContentSection(teamId.ToString()); string[] position; for (int i = 0; i < MAX_SPAWNS; ++i) { position = section[i].Split(','); spawns[(int)teamId, i].X = Double(position[0]); spawns[(int)teamId, i].Y = Double(position[1]); spawns[(int)teamId, i].Z = Double(position[2]); spawns[(int)teamId, i].Angle = Float(position[3]); } }
public void SaveDueDate(string issueDueDate, int issueId) { try { bool isValidDate = false; var issue = repo.GetIssue(issueId); if (issue != null) { if (!String.IsNullOrEmpty(issueDueDate)) { issue.DueDate = DateTime.Parse(issueDueDate); isValidDate = true; } else { issue.DueDate = DateTime.Now.AddYears(-1000); } var result = repo.SaveIssue(issue); if (result.Status) { if (isValidDate) { var activity = issueService.SaveActivityForDueDate(issueId, TeamID, UserID); if (activity != null) { var activityVM = issueService.GetActivityVM(activity); var context = GlobalHost.ConnectionManager.GetHubContext <IssuesHub>(); context.Clients.Group(TeamID.ToString()).addNewTeamActivity(activityVM); } } } else { log.Error(result); } } } catch (Exception ex) { log.Error(ex); } }
public async Task <ActionResult> Comment(NewIssueCommentVM model, string Connection) { try { if (ModelState.IsValid) { model.CommentBody = HttpUtility.HtmlEncode(model.CommentBody); var comment = new CommentVM { CommentBody = model.CommentBody, IssueId = model.IssueID, Author = new UserDto { Id = UserID } }; var commentId = commentManager.SaveComment(comment); var newCommentVm = commentManager.GetComment(commentId); var context = GlobalHost.ConnectionManager.GetHubContext <IssuesHub>(); //Send to all other users except the Author. newCommentVm.IsOwner = false; string[] excludedConn = new string[] { Connection }; context.Clients.Groups(new string[] { TeamID.ToString() }, excludedConn).addNewComment(newCommentVm); //For Sending to the author newCommentVm.IsOwner = true; await commentManager.SendEmailNotificaionForNewComment(comment); return(Json(new { Status = "Success", Data = newCommentVm })); } return(Json(new { Status = "Error" })); } catch (Exception ex) { log.Error(ex); return(Json(new { Status = "Error" })); } }
public ActionResult Add(CreateIssue model, List <HttpPostedFileBase> files) { try { if (ModelState.IsValid) { var previousVersion = issueManager.GetIssue(model.Id); var newVersion = issueManager.SaveIssue(model, files); var issueActivity = issueManager.SaveActivity(model, previousVersion, newVersion); var context = GlobalHost.ConnectionManager.GetHubContext <IssuesHub>(); if (issueActivity != null) { context.Clients.Group(TeamID.ToString()).addNewTeamActivity(issueActivity); context.Clients.Group(TeamID.ToString()).addIssueToIssueList(newVersion); //update the dashboard var dashboardSummary = issueManager.GetDashboardSummaryVM(issueActivity.TeamId); context.Clients.Group(TeamID.ToString()).updateDashboardSummary(dashboardSummary); } if (Request.IsAjaxRequest()) { if (model.Id == 0) { // var issueVM = issueService.GetIssueVM(issue); // context.Clients.Group(TeamID.ToString()).addIssueToIssueList(issueVM); //issueService.SendEmailNotificationsToSubscribers(issue, TeamID, UserID, SiteBaseURL); } return(Json(new { Status = "Success" })); } if ((files != null) && (files.Any())) { int fileCounter = 0; foreach (var file in files) { // fileCounter = SaveAttachedDocument(model, result, fileCounter, file); } } if (model.IsFromModalWindow) { if (Request.UrlReferrer != null) { return(Redirect(Request.UrlReferrer.AbsoluteUri)); } } return(RedirectToAction("Index")); } } catch (MissingSettingsException mex) { log.Debug(mex); return(Json(new { Status = "Error", Message = String.Format("You need to set a value for {0} first.", mex.MissingSettingName) })); } catch (Exception ex) { log.Error(ex); if (Request.IsAjaxRequest()) { return(Json(new { Status = "Error", Message = "Error saving issue" })); } } LoadDropDownsForCreate(model); return(View(model)); }
/// <summary> /// Initialises the class before Start. /// </summary> private void Awake() { transform.SetParent(GameManager.s_Singleton.transform); m_TeamID = (TeamID)(transform.GetSiblingIndex() + 1); name = TeamID.ToString(); }
public void SetWinner(TeamID team) { title.text = $"<color={team.ToString().ToLower()}>{team}</color> TEAM WINS!"; }