internal static WWW GetResults(Mission m, MissionStatus ms) { WWWForm form = new WWWForm(); form.AddField("MissionType", m.MissionType.ToString()); form.AddField("MissionName", m.Name); form.AddField("MissionStatus", ms.ToString()); return(CreateWWW("/getResults", form)); }
public bool CheckObjectiveStatus(double timeStamp) { MissionStatus objectiveStatusCheck = MissionStatus.Dormant; if (Missions.Get.ObjectiveStatusByName(MissionName, ObjectiveName, ref objectiveStatusCheck)) { if (Flags.Check((uint)ObjectiveStatus, (uint)objectiveStatusCheck, Flags.CheckType.MatchAny)) { //we've hit the objective status check, set our convo now Debug.Log("Objective " + ObjectiveName + " is of status " + ObjectiveStatus.ToString() + " so indress is changing to " + ConversationOnObjectiveStatus); talkative.State.ConversationName = ConversationOnObjectiveStatus; } } return(true); }
internal static WWW SendMissionAccomplished(MissionType MissionType, string MissionName, int Round, MissionStatus ms, Dictionary <ScoreType, Result> actualResults, bool getScores) { int interventions = (int)actualResults[ScoreType.Interventions].Value; float time = actualResults[ScoreType.Time].Value; WWWForm form = new WWWForm(); form.AddField("MissionType", MissionType.ToString()); form.AddField("MissionName", MissionName); form.AddField("MissionStatus", ms.ToString()); form.AddField("Interventions", interventions); form.AddField("Time", "" + (int)(time * 1000)); form.AddField("Round", Round); form.AddField("GetScores", getScores ? 1 : 0); WWW www = CreateWWW("/save", form); return(www); }
public void UpdateMissionStatus(int id, MissionStatus status) { missions = GameObject.Find("Menu").GetComponentsInChildren <Text>(); foreach (Text t in missions) { if (t.name.StartsWith("Status-") && t.name.Contains(id.ToString())) { t.text = status.ToString(); if (status == MissionStatus.Completed) { t.fontStyle = FontStyle.Bold; } else if (status == MissionStatus.Failed) { t.color = new Color(255, 0, 0); } return; } } }
public void OnActive( ) { //check to see if it's time to spawn Albert if (mHasSpawnedGuards) { enabled = true; return; } MissionStatus status = MissionStatus.Dormant; if (Missions.Get.ObjectiveStatusByName("Family", "GetBackIntoLab", ref status)) { if (Flags.Check((uint)MissionStatus.Active, (uint)status, Flags.CheckType.MatchAny)) { Debug.Log("Time to spawn guards"); SpawnGuards(); } } else { Debug.Log("Hasn't spawned guards yet because family / back into lab is " + status.ToString()); } }