public override void OnIntersectionEntered(ICrossable _intersection) { DebugController.LogMessage("Entered crosswalk"); if (currentCrossingZone == null || !currentCrossingZone.Equals(_intersection)) { currentCrossingZone?.OnFinishedCrossing(this); currentCrossingZone = (Intersection)_intersection; transitionController?.OnIntersectionEntered(); } }
public override void OnCrossWalkEntered(ICrossable _crossWalk) { //DebugController.LogMessage($"Entered crosswalk { gameObject.name }"); if (currentCrossingZone == null || !currentCrossingZone.Equals(_crossWalk)) { currentCrossingZone?.OnFinishedCrossing(this); currentCrossingZone = _crossWalk; transitionController?.OnCrossWalkEntered(); } }
public override void OnIntersectionExited(ICrossable _intersection) { // base.OnIntersectionExited(_intersection); // DebugController.LogMessage("Exited crosswalk"); if (currentCrossingZone != null) { if (currentCrossingZone.Equals(_intersection)) { currentCrossingZone = null; } } SwitchToState(AIState.Moving); }
public override void OnCrossWalkExited(ICrossable _crossWalk) { base.OnCrossWalkExited(_crossWalk); // DebugController.LogMessage("Exited crosswalk"); if (currentCrossingZone != null) { if (currentCrossingZone.Equals(_crossWalk)) { currentCrossingZone = null; } } SwitchToState(AIState.Moving); }
public override void OnCrossWalkEntered(ICrossable _crossWalk) { DebugController.LogMessage("Player entered crosswalk"); // Si hay peatones cruzando sacar lo de las infracciones Crosswalk cross = ((Crosswalk)_crossWalk); if (cross.GetNumberOfCrossingPedestrians > 0) { if (!cross.CanCrossIfPathIsFree(this)) { ScoreManager.instance.AddInfraction(); CanvasManager._instance.ActivateCheckOrCross(false); CanvasManager._instance.GenerateFeedback("CrossWithPedestrian"); } } OnStartedCrossing(_crossWalk); _crossWalk.OnStartedCrossing(this); }
public override void OnCrossWalkExited(ICrossable _crossWalk) { DebugController.LogMessage("Player exited crosswalk"); _crossWalk.OnFinishedCrossing(this); }
public override void OnIntersectionExited(ICrossable _intersection) { }
public override void OnIntersectionEntered(ICrossable _crossWalk) { }
public override void OnStartedCrossing(ICrossable _crossable) { base.OnStartedCrossing(_crossable); GetCurrentCrossingZone.OnStartedCrossing(this); SwitchToState(AIState.Crossing); }