private void SetLabel() { labelLapCount.Content = LapCount.ToString() + " "; labelTotalRot.Content = TotalRot.ToString() + " "; labelMaxRot.Content = MaxRot.ToString() + " "; labelAverageRot.Content = AverageRot.ToString("f2"); }
private KeyValuePair <LapCount, LapData> GenerateLap(int i, TimeSpan timeSpan) { var lapCount = new LapCount(i); var lapData = BuildLapData(timeSpan); return(new KeyValuePair <LapCount, LapData>(lapCount, lapData)); }
private void Save() { var div = "\t"; var sb = new StringBuilder(); sb.Append("時刻") .Append(div) .Append("ロット数") .AppendLine(); Laps.ForEach(x => { sb.Append(x.TimeStamp.ToString("yyyy/MM/dd HH:mm:ss.fff")) .Append(div) .Append(x.Rot) .AppendLine(); }); sb.AppendLine(); sb.Append("悟飯の出番").Append(div).Append(LapCount.ToString()).AppendLine(); sb.Append("合計ロット数").Append(div).Append(TotalRot.ToString()).AppendLine(); sb.Append("最大ロット数").Append(div).Append(MaxRot.ToString()).AppendLine(); sb.Append("平均ロット数").Append(div).Append(AverageRot.ToString("f2")).AppendLine(); try { Clipboard.SetText(sb.ToString()); } catch (Exception) { MessageBox.Show( "クリップボードにコピーできませんでした。", "エラー", MessageBoxButton.OK, MessageBoxImage.Error); return; } MessageBox.Show( "カカログをクリップボードにコピーしました。", "完了", MessageBoxButton.OK, MessageBoxImage.Information); }
void Start() { _lapCount = GameObject.FindGameObjectsWithTag("RacingCar")[playerNo].gameObject.GetComponent <LapCount>(); _lapMax = FindInfoByScene.Instance.GetLapMax(SceneManager.GetActiveScene().name); }
public void LapCount_IncrementsByOne_WhenNextLapIsRequested(int count) { var lapCount = new LapCount(count); Assert.Equal(lapCount.Count + 1, lapCount.NextLap().Count); }
// Use this for initialization void Start() { lapScript = gameObject.GetComponent<LapCount>(); }
// Use this for initialization void Start() { lapScript = gameObject.GetComponent<LapCount>(); kartControls = gameObject.GetComponent<KartControls>(); aiKart = gameObject.GetComponent<AIKart>(); }