/// <summary> /// Triggered by button. Display warning to player that they are about to fire a character. /// </summary> public void FireCrewWarning() { TrackerEventSender.SendEvent(new TraceEvent("FirePopUpOpened", TrackerAsset.Verb.Accessed, new Dictionary <TrackerContextKey, object> { { TrackerContextKey.CrewMemberName, _currentMember.Name }, { TrackerContextKey.CurrentTalkTime, GameManagement.ActionAllowance }, { TrackerContextKey.CurrentSession, GameManagement.CurrentSessionString }, { TrackerContextKey.CrewMemberPosition, _currentMember.BoatPosition() }, { TrackerContextKey.SizeOfTeam, GameManagement.CrewCount }, { TrackerContextKey.CrewMemberSessionsInTeam, _currentMember.SessionsIncluded() } }, AccessibleTracker.Accessible.Screen)); _fireWarningPopUp.Active(true); _fireWarningPopUp.transform.EnableSmallBlocker(() => CloseFireCrewWarning(TrackerTriggerSource.PopUpBlocker.ToString())); DoBestFit(); }
/// <summary> /// Set-up the pop-up for displaying the given CrewMember /// </summary> public void SetUpDisplay(CrewMember crewMember, string source) { //do not display if the season has finished if (!GameManagement.SeasonOngoing) { return; } //Change the opinion icon dictionary from the available array if not already done if (_opinionIconDict == null) { _opinionIconDict = _opinionIcons.ToDictionary(o => o.name.Replace("Icon_Box_", string.Empty), o => o); } _currentMember = crewMember; //ensure that the crew member is visible on the crew container at the bottom UIManagement.TeamSelection.EnsureVisible(_currentMember); //make pop-up visible and firing warning not visible gameObject.Active(true); _fireWarningPopUp.Active(false); //disable opinion images on CrewMember UI objects ResetOpinionIcons(); TrackerEventSender.SendEvent(new TraceEvent("CrewMemberPopUpOpened", TrackerAsset.Verb.Accessed, new Dictionary <TrackerContextKey, object> { { TrackerContextKey.CrewMemberName, crewMember.Name }, { TrackerContextKey.CurrentTalkTime, GameManagement.ActionAllowance }, { TrackerContextKey.CurrentSession, GameManagement.CurrentSessionString }, { TrackerContextKey.CrewMemberPosition, crewMember.BoatPosition() }, { TrackerContextKey.SizeOfTeam, GameManagement.CrewCount }, { TrackerContextKey.TriggerUI, source }, { TrackerContextKey.CrewMemberSessionsInTeam, crewMember.SessionsIncluded() } }, AccessibleTracker.Accessible.Screen)); SUGARManager.GameData.Send("View Crew Member Screen", crewMember.Name); Display(); //set the order of the pop-ups and pop-up blockers and set-up the click event for the blocker transform.EnableSmallBlocker(() => CloseCrewMemberPopUp(TrackerTriggerSource.PopUpBlocker.ToString())); }