Пример #1
0
 private void valueChanged(RaceResults value)
 {
     if (this.RaceResultsChanged != null)
     {
         this.RaceResultsChanged(value);
     }
 }
Пример #2
0
        private void Start()
        {
            dispatcher           = Service.Get <EventDispatcher>();
            dataEntityCollection = Service.Get <CPDataEntityCollection>();
            dispatcher.DispatchEvent(default(RaceGameEvents.Start));
            DataEntityHandle localPlayerHandle = dataEntityCollection.LocalPlayerHandle;

            if (dataEntityCollection.TryGetComponent <RaceData>(localPlayerHandle, out localPlayerRaceData))
            {
                CompletionTime      = localPlayerRaceData.RaceResults.CompletionTime;
                RaceResultsCategory = localPlayerRaceData.RaceResults.raceResultsCategory;
                return;
            }
            localPlayerRaceData = dataEntityCollection.AddComponent <RaceData>(localPlayerHandle);
            RaceResults raceResults = new RaceResults();

            raceResults.CompletionTime      = 0L;
            raceResults.raceResultsCategory = RaceResults.RaceResultsCategory.Incomplete;
            localPlayerRaceData.RaceResults = raceResults;
        }
Пример #3
0
 public RaceFinished(RaceResults raceResults, long[] rankTimes)
 {
     RaceResults = raceResults;
     RankTimes   = rankTimes;
 }