Exemplo n.º 1
0
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (TotalTime?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (TotalDistance?.GetHashCode() ?? 0);
            return(hashCode);
        }
Exemplo n.º 2
0
        /// <summary>
        /// returns hash code
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            //return base.GetHashCode() ^ DeltaDistance.GetHashCode() ^ TotalDistance.GetHashCode() ^ Velocity.GetHashCode();
            int hash = 13;

            hash = hash * 23 + base.GetHashCode();
            hash = hash * 23 + DeltaDistance.GetHashCode();
            hash = hash * 23 + TotalDistance.GetHashCode();
            hash = hash * 23 + Velocity.GetHashCode();
            return(hash);
        }
Exemplo n.º 3
0
        public override Dictionary <string, object> DumpBasicEventData()
        {
            var rv = new Dictionary <string, object>(base.DumpBasicEventData());

            rv.Add("Total Distance (cm)", TotalDistance.ToString());
            rv.Add("Actual Distance (cm)", ActualDistance.ToString());
            rv.Add("WayPoint Distance (cm)", WayPointDistance.ToString());
            rv.Add("Pace", Pace.ToString());

            return(rv);
        }
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = EqualityComparer <TValue> .Default.GetHashCode(Value);

                hashCode = (hashCode * 397) ^ OutgoingEdges.GetHashCode();
                hashCode = (hashCode * 397) ^ TotalDistance.GetHashCode();
                hashCode = (hashCode * 397) ^ (Predecessor != null ? Predecessor.GetHashCode() : 0);
                return(hashCode);
            }
        }
Exemplo n.º 5
0
    // Start is called before the first frame update
    private void Start()
    {
        PlayerPrefs.SetInt("TopSpeed1", 0);
        PlayerPrefs.SetInt("MaintainSpeed1", 0);
        PlayerPrefs.SetInt("RacePlacement1", 0);
        PlayerPrefs.SetInt("TotalDistance1", 0);
        PlayerPrefs.SetInt("DailiesCompleted", 0);

        tsc01 = new TopSpeed(topSpeedImage, 20);
        msc01 = new MaintainSpeed(maintainSpeedImage, 10, 30);
        rpc01 = new RacePlacement(racePlacementImage, 3);
        tdc01 = new TotalDistance(totalDistanceImage, 2);
        dcc01 = new DailiesCompleted(dailiesCompletedImage);
    }
Exemplo n.º 6
0
 internal PanEventArgs Diff(PanEventArgs lastArgs)
 {
     return(new PanEventArgs
     {
         Cancelled = Cancelled,
         Handled = Handled,
         ViewPosition = ViewPosition,
         Touches = Touches,
         Listener = Listener,
         Velocity = Velocity,
         TotalDistance = TotalDistance,
         DeltaDistance = TotalDistance.Subtract(lastArgs.TotalDistance)
     });
 }
Exemplo n.º 7
0
    IEnumerator TotalDistanceTrigger(TotalDistance challenge)
    {
        PlayerPrefs.SetInt("TotalDistance1", 1);
        challengeImage.GetComponent <RawImage>().texture = challenge.Image.GetComponent <RawImage>().texture;
        challengeTitle.GetComponent <Text>().text        = challenge.Title;
        challengeDescription.GetComponent <Text>().text  = challenge.Description;
        challengePanel.SetActive(true);

        yield return(new WaitForSeconds(7));

        challengePanel.SetActive(false);
        challengeTitle.GetComponent <Text>().text       = "";
        challengeDescription.GetComponent <Text>().text = "";
    }
Exemplo n.º 8
0
        public String GetTextView(Int32 indentLevel)
        {
            String        i  = HttpClientHelper.Indent(indentLevel);
            StringBuilder sb = new StringBuilder()
                               .Append(i).Append("Id:                            ").Append(Id)
                               .Append(i).Append("Id_External:                   ").Append(Id_External)
                               .Append(i).Append("CreatedAt:                     ").Append(CreatedAt.F("yyyy.MM.dd HH:mm:ss"))
                               .Append(i).Append("UpdatedAt:                     ").Append(UpdatedAt.F("yyyy.MM.dd HH:mm:ss"))
                               .Append(i).Append("Description:                   ").Append(Description)
                               .Append(i).Append("AdditionalInfo:                ").Append(AdditionalInfo)
                               .Append(i).Append("Id_Machine:                    ").Append(Id_Machine)
                               .Append(i).Append("StartTime:                     ").Append(StartTime.F("yyyy.MM.dd HH:mm:ss"))
                               .Append(i).Append("EndTime:                       ").Append(EndTime.F("yyyy.MM.dd HH:mm:ss"))
                               .Append(i).Append("ActionType:                    ").Append(ActionType)
                               .Append(i).Append("ActionSubtype:                 ").Append(ActionSubtype)
                               .Append(i).Append("Id_WorkType:                   ").Append(Id_WorkType)
                               .Append(i).Append("Id_Driver:                     ").Append(Id_Driver)
                               .Append(i).Append("Id_Implement:                  ").Append(Id_Implement)
                               .Append(i).Append("IsWorkForContractors:          ").Append(IsWorkForContractors)
                               .Append(i).Append("IsWorkForLandOwners:           ").Append(IsWorkForLandOwners)
                               .Append(i).Append("RealImplementWidth:            ").Append(RealImplementWidth.F("0.00"))
                               .Append(i).Append("TotalDistance:                 ").Append(TotalDistance.F("0.00"))
                               .Append(i).Append("TotalDistanceByHours:          ").Append(TotalDistanceByHours.F())
                               .Append(i).Append("WorkDistance:                  ").Append(WorkDistance.F("0.00"))
                               .Append(i).Append("WorkDistanceByHours:           ").Append(WorkDistanceByHours.F())
                               .Append(i).Append("WorkArea:                      ").Append(WorkArea.F("0.00"))
                               .Append(i).Append("WorkAreaByHours:               ").Append(WorkAreaByHours.F())
                               .Append(i).Append("CoveredArea:                   ").Append(CoveredArea.F("0.00"))
                               .Append(i).Append("CoveredAreaHourly:             ").Append(CoveredAreaByHours.F())
                               .Append(i).Append("WorkDuration:                  ").Append(WorkDuration)
                               .Append(i).Append("WorkDurationHourly:            ").Append(WorkDurationByHours.F())
                               .Append(i).Append("WorkTimetable:                 ").Append(WorkTimetable.F())
                               .Append(i).Append("Season:                        ").Append(Season)
                               .Append(i).Append("Status:                        ").Append(Status)
                               .Append(i).Append("StopsOnRoadTimetable:          ").Append(StopsOnRoadTimetable.F())
                               .Append(i).Append("StopsOnRoadDuration:           ").Append(StopsOnRoadDuration)
                               .Append(i).Append("StopsOnRoadDurationHourly:     ").Append(StopsOnRoadDurationHourly.F())
                               .Append(i).Append("MovementsOnRoadTimetable:      ").Append(MovementsOnRoadTimetable.F())
                               .Append(i).Append("MovementsOnRoadDuration:       ").Append(MovementsOnRoadDuration)
                               .Append(i).Append("MovementsOnRoadDurationHourly: ").Append(MovementsOnRoadDurationHourly.F())
                               .Append(i).Append("TimeWithoutGpsData:            ").Append(TimeWithoutGpsData)
                               .Append(i).Append("TrackIntegrityCoef:            ").Append(TrackIntegrityCoef);

            return(sb.ToString());
        }
Exemplo n.º 9
0
 /// <summary>
 /// Equality test
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(PanEventArgs other)
 {
     return(other != null && DeltaDistance.Equals(other.DeltaDistance) && TotalDistance.Equals(other.TotalDistance) && Velocity.Equals(other.Velocity) && base.Equals(other));
 }
 // Code below was autogenerated by ReSharper as an implementation for the IEquatable interface
 // This is untested and really not be used in favour of bitwise comparison if you want to be 100 % sure
 public bool Equals(Node <TCost, TValue> other)
 {
     if (other is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(EqualityComparer <TValue> .Default.Equals(Value, other.Value) && Equals(OutgoingEdges, other.OutgoingEdges) && TotalDistance.Equals(other.TotalDistance) && Equals(Predecessor, other.Predecessor));
 }