예제 #1
0
    public IEnumerator SendReport(string body)
    {
        var subject = "SCENARIO ISSUE";
        var bodyWithScenarioHistory = "";

        if (_incidentManager.NextIncident.Count > 0)
        {
            var currentIncident = _incidentManager.NextIncident[0];

            bodyWithScenarioHistory = ScenarioTracker.GetScenarioHistory(body, currentIncident.Scenario.Id,
                                                                         currentIncident.IncidentContent.Title, Location.CurrentLocation,
                                                                         (DeviceLocation.shouldOverrideLanguage ? DeviceLocation.overrideLanguage.ToString() : "English"));
        }
        else
        {
            bodyWithScenarioHistory = ScenarioTracker.GetScenarioHistory(body, "", "", "", "");
        }

        var www = new WWW(ElasticEmail.GetAddress(), ElasticEmail.GetForm(subject, bodyWithScenarioHistory));

        yield return(www);

        var message = www.error == null
            ? Localization.Get("BASIC_TEXT_SENT")
            : Localization.Get("BASIC_TEXT_ERROR");

        yield return(Loading.Stop(message, 1f));

        if (www.error == null)
        {
            FeedbackObject.gameObject.SetActive(false);
        }
    }
예제 #2
0
    public IEnumerator SendFeedback(string body)
    {
        var subject = "FEEDBACK";

        var www = new WWW(ElasticEmail.GetAddress(), ElasticEmail.GetForm(subject, body));

        yield return(www);

        var message = www.error == null
            ? Localization.Get("BASIC_TEXT_SENT")
            : Localization.Get("BASIC_TEXT_ERROR");

        yield return(Loading.Stop(message, 1f));

        if (www.error == null)
        {
            FeedbackObject.gameObject.SetActive(false);
        }
    }