private void TraceExit(bool exited, IChapterTarget targetOnExit) { var ed = area.Element as Exit; // ALTERNATIVE if ("alternative".Equals(targetOnExit.getXApiClass(), IgnoreCase)) { var parsedType = (AlternativeTracker.Alternative)Enum.Parse(typeof(AlternativeTracker.Alternative), targetOnExit.getXApiType(), true); if (ConditionChecker.check(ed.getConditions())) { if (targetOnExit.getXApiType() == "menu") { TrackerAsset.Instance.Alternative.Selected(targetOnExit.getId(), ed.getNextSceneId(), parsedType); } else { TrackerAsset.Instance.setSuccess(true); TrackerAsset.Instance.Alternative.Selected(targetOnExit.getId(), ed.getNextSceneId(), parsedType); } } else { if (targetOnExit.getXApiType() != "menu") { TrackerAsset.Instance.setSuccess(false); TrackerAsset.Instance.Alternative.Selected(targetOnExit.getId(), "Incorrect", parsedType); } } TrackerAsset.Instance.Flush(); } // ACCESIBLE // If no exited, accesible doesnt matter if (!exited) { return; } // If no destination accesible doesnt matter var destination = Game.Instance.GameState.GetChapterTarget(ed.getNextSceneId()); if (destination == null) { return; } if ("accesible".Equals(destination.getXApiClass(), IgnoreCase)) { var type = ExParsers.ParseDefault(destination.getXApiType(), AccessibleTracker.Accessible.Accessible); TrackerAsset.Instance.Accessible.Accessed(destination.getId(), type); } }
private TrackerAsset.TrackerEvent TraceExit(bool exited, IChapterTarget targetOnExit) { if (!TrackerAsset.Instance.Started) { return(null); } var ed = area.Element as Exit; // ALTERNATIVE if ("alternative".Equals(targetOnExit.getXApiClass(), IgnoreCase)) { var parsedType = (AlternativeTracker.Alternative)Enum.Parse(typeof(AlternativeTracker.Alternative), targetOnExit.getXApiType(), true); if (ConditionChecker.check(ed.getConditions())) { if (targetOnExit.getXApiType() == "menu") { return(TrackerAsset.Instance.Alternative.Selected(targetOnExit.getId(), ed.getNextSceneId(), parsedType)); } else { TrackerAsset.Instance.setSuccess(true); return(TrackerAsset.Instance.Alternative.Selected(targetOnExit.getId(), ed.getNextSceneId(), parsedType)); } } else { if (targetOnExit.getXApiType() != "menu") { TrackerAsset.Instance.setSuccess(false); return(TrackerAsset.Instance.Alternative.Selected(targetOnExit.getId(), "Incorrect", parsedType)); } } } return(null); }
private void trackSceneChange(IChapterTarget target) { alternative = null; if (!string.IsNullOrEmpty(target.getXApiClass())) { if (target.getXApiClass() == "accesible") { Tracker.T.accessible.Accessed(target.getId(), ParseEnum <AccessibleTracker.Accessible>(target.getXApiType())); } else if (target.getXApiClass() == "alternative") { alternative = target; } } CompletableController.Instance.targetChanged(target); Tracker.T.RequestFlush(); }
public void TargetChanged(IChapterTarget target) { if (!string.IsNullOrEmpty(target.getXApiClass()) && target.getXApiClass() == "accesible") { TrackerAsset.Instance.Accessible.Accessed(target.getId(), ExParsers.ParseEnum <AccessibleTracker.Accessible>(target.getXApiType())); TrackerAsset.Instance.Flush(); } UpdateCompletables(completableController => completableController.UpdateMilestones(target)); }
private void trackSceneChange(IChapterTarget target) { if (!string.IsNullOrEmpty(target.getXApiClass()) && target.getXApiClass() == "accesible") { TrackerAsset.Instance.Accessible.Accessed(target.getId(), ExParsers.ParseEnum <AccessibleTracker.Accessible>(target.getXApiType())); TrackerAsset.Instance.Flush(); } CompletablesController.Instance.TargetChanged(target); }