// Token: 0x060018CA RID: 6346 RVA: 0x0002C0DC File Offset: 0x0002B0DC public virtual void OnUpdate(EntrantInfo entrant, Event evnt, float dt) { InstancedEvent instancedEvent = evnt as InstancedEvent; DragScoringState dragScoringState = entrant.ScoringState as DragScoringState; if (dragScoringState != null) { dragScoringState.FractionCompleted = this.GetFractionCompleted(dragScoringState, entrant, instancedEvent); dragScoringState.DistanceToStartLine = instancedEvent.GetDistanceToStartLine(entrant.Opponent.Vehicle); float speed = entrant.Opponent.Vehicle.GetSpeed(); if (speed > dragScoringState.TopSpeed) { dragScoringState.TopSpeed = speed; } if (entrant.Opponent.Vehicle.GetCurrentAirborneTime() > dragScoringState.LongestAirTimeInSeconds) { dragScoringState.LongestAirTimeInSeconds = entrant.Opponent.Vehicle.GetCurrentAirborneTime(); } if (entrant.Opponent.Vehicle.GetNumWheelsOnGround() == 0) { dragScoringState.SumAirTimeInSeconds += dt; } if (entrant.Opponent.InternalOpponent.GetNumOpponentsCollidedWith() > dragScoringState.NumOpponentsTagged) { dragScoringState.NumOpponentsTagged = entrant.Opponent.InternalOpponent.GetNumOpponentsCollidedWith(); } entrant.Opponent.InternalOpponent.SetFractionEventComplete(dragScoringState.FractionCompleted); } }
// Token: 0x06001997 RID: 6551 RVA: 0x0002E398 File Offset: 0x0002D398 public virtual void OnUpdate(EntrantInfo entrant, Event evnt, float dt) { TeamEscapeScoringState teamEscapeScoringState = entrant.ScoringState as TeamEscapeScoringState; InstancedEvent instancedEvent = evnt as InstancedEvent; if (teamEscapeScoringState != null) { teamEscapeScoringState.FractionCompleted = this.GetFractionCompleted(teamEscapeScoringState, entrant, instancedEvent); teamEscapeScoringState.DistanceToStartLine = instancedEvent.GetDistanceToStartLine(entrant.Opponent.Vehicle); teamEscapeScoringState.DistanceToFinish = this.GetDistanceToFinish(teamEscapeScoringState, entrant, instancedEvent); if (!instancedEvent.IsTimingOut) { teamEscapeScoringState.TimeRemaining = evnt.EventDef.TimeLimit() - entrant.ScoringState.EventDurationInSeconds; } else { teamEscapeScoringState.TimeRemaining = (float)instancedEvent.TimingOutRemaining.TotalSeconds; } if (!teamEscapeScoringState.IsTimerUrgent && teamEscapeScoringState.TimeRemaining < evnt.EventDef.TimeLimitWarning()) { teamEscapeScoringState.IsTimerUrgent = true; new OnTimingOut(entrant.PersonaId).Post(Ports.Gameplay); } float speed = entrant.Opponent.Vehicle.GetSpeed(); if (speed > teamEscapeScoringState.TopSpeed) { teamEscapeScoringState.TopSpeed = speed; } if (entrant.Opponent.Vehicle.GetCurrentAirborneTime() > teamEscapeScoringState.LongestAirTimeInSeconds) { teamEscapeScoringState.LongestAirTimeInSeconds = entrant.Opponent.Vehicle.GetCurrentAirborneTime(); } if (entrant.Opponent.InternalOpponent.GetNumOpponentsCollidedWith() > teamEscapeScoringState.NumOpponentsTagged) { teamEscapeScoringState.NumOpponentsTagged = entrant.Opponent.InternalOpponent.GetNumOpponentsCollidedWith(); } if (entrant.Opponent is LocalHumanOpponent) { Screen.Print(-300, 120, string.Format("{0} : {1}", entrant.Opponent.OpponentName, teamEscapeScoringState.FractionCompleted)); } entrant.Opponent.InternalOpponent.SetFractionEventComplete(teamEscapeScoringState.FractionCompleted); LocalHumanOpponent localHumanOpponent = entrant.Opponent as LocalHumanOpponent; if (localHumanOpponent != null) { PursuitInfo pursuitData = localHumanOpponent.PursuitData; teamEscapeScoringState.CopsDisabled = pursuitData.GetNumCopsDisabled(); teamEscapeScoringState.CopsRammed = pursuitData.GetNumCopsRammed(); teamEscapeScoringState.CopsDeployed = pursuitData.GetNumCopsDeployed(); teamEscapeScoringState.CostToState = pursuitData.GetCostToState(); teamEscapeScoringState.SpikeStripsDodged = pursuitData.GetSpikeStripsDodged(); teamEscapeScoringState.RoadBlocksDodged = pursuitData.GetRoadBlocksDodged(); teamEscapeScoringState.Infractions = pursuitData.GetInfractions(); pursuitData.HACK_SetPursuitMeter(teamEscapeScoringState.PursuitBar); } } }
// Token: 0x06001999 RID: 6553 RVA: 0x0002E5B4 File Offset: 0x0002D5B4 protected virtual float GetDistanceToFinish(TeamEscapeScoringState state, EntrantInfo entrant, InstancedEvent evnt) { float num = evnt.TrackLayout.GetLapStartToVehicleDistance(entrant.Opponent.Vehicle); float lapStartToCheckpointDistance = evnt.TrackLayout.GetLapStartToCheckpointDistance(entrant.RoutingState.NextIndex); if (num > lapStartToCheckpointDistance) { num -= evnt.TrackLayout.GetLapLength(0); } if (num <= 0f) { num = -evnt.GetDistanceToStartLine(entrant.Opponent.Vehicle); } return(evnt.TrackLayout.GetLength(evnt.NumLaps) - num); }