Esempio n. 1
0
    public void CitizenHelpPressed()
    {
        AddIncidentHistory(m_dialogBox.CurrentIncident, IncidentHistoryElement.Decision.Citizen);

#if SELECT_INCIDENTS
        Incident currentIncident = NextIncident[incidentShowingIndex];
        m_dialogBox.CurrentIncident = currentIncident;
#else
        var currentIncident = NextIncident[0];
        m_dialogBox.CurrentIncident = currentIncident;
#endif
        ScenarioTracker.AddDecision(currentIncident.Scenario.Id, currentIncident.IncidentContent.Title, "Citizen", Location.CurrentLocation, (DeviceLocation.shouldOverrideLanguage ? DeviceLocation.overrideLanguage.ToString() : "English"));

        m_IncidentQueue.RemoveWarningIcon(currentIncident.Scenario.Id);
        m_IncidentQueue.ChangeCaseState(currentIncident.Scenario.Id, IncidentCase.State.CitizenRequest);
        //make sure the incident is updated next turn, we will handle the citizen request result when we next show the incident
        currentIncident.TurnToShow++;
        GameObject.Find("TurnManager").GetComponent <SimplifiedJson>().CitizenPressed(ref currentIncident);
        NextIncident[0] = currentIncident;
        for (var i = 0; i < incidents.Count; i++)
        {
            if (incidents[i].Scenario.Id == currentIncident.Scenario.Id)
            {
                incidents[i] = currentIncident;
                break;
            }
        }



        ShowNext();
    }
Esempio n. 2
0
    public void ResolvePressed()
    {
        AddIncidentHistory(m_dialogBox.CurrentIncident, IncidentHistoryElement.Decision.Officer);


#if SELECT_INCIDENTS
        var currentIncident = NextIncident[incidentShowingIndex];
        m_dialogBox.CurrentIncident = currentIncident;
#else
        var currentIncident = NextIncident[0];
        m_dialogBox.CurrentIncident = currentIncident;
#endif
        ScenarioTracker.AddDecision(currentIncident.Scenario.Id, currentIncident.IncidentContent.Title, "Officer", Location.CurrentLocation, (DeviceLocation.shouldOverrideLanguage ? DeviceLocation.overrideLanguage.ToString() : "English"));

        m_IncidentQueue.RemoveWarningIcon(currentIncident.Scenario.Id);

        GameObject.Find("TurnManager").GetComponent <SimplifiedJson>().OfficerPressed(ref currentIncident);

        m_IncidentQueue.ChangeCaseState(currentIncident.Scenario.Id, IncidentCase.State.OfficersSent);
        NextIncident[0] = currentIncident;

        for (var i = 0; i < incidents.Count; i++)
        {
            if (incidents[i].Scenario.Id == currentIncident.Scenario.Id)
            {
                incidents[i] = currentIncident;
                break;
            }
        }



        ShowNext();
    }