本文整理汇总了C#中Statistics类的典型用法代码示例。如果您正苦于以下问题:C# Statistics类的具体用法?C# Statistics怎么用?C# Statistics使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Statistics类属于命名空间,在下文中一共展示了Statistics类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DebugManager
public DebugManager(Game game, Camera camera, ChunkCache chunkCache, SpriteFont debugFont)
: base(game)
{
m_graphs = new GraphManager(game);
m_debugger = new InGameDebugger(game, camera);
var statistics = new Statistics(game, chunkCache);
m_components = new GameComponentCollection
{
m_debugger,
new DebugBar(game, statistics, chunkCache),
statistics,
m_graphs,
new GameConsole(game, new SpriteBatch(game.GraphicsDevice), new GameConsoleOptions
{
Font = debugFont,
FontColor = Color.LawnGreen,
Prompt = ">",
PromptColor = Color.Crimson,
CursorColor = Color.OrangeRed,
BackgroundColor = Color.Black*0.8f,
PastCommandOutputColor = Color.Aqua,
BufferColor = Color.Gold
}, m_debugger.ToggleInGameDebugger)
};
}
示例2: GetStatistics
public Statistics GetStatistics()
{
if (statistics == null) {
statistics = GameObject.Find ("GameManager").GetComponent<Statistics> ();
}
return statistics;
}
示例3: Sender
public Sender(Log log, Statistics statistics, ProgramConfiguration programConfiguration)
: base(log, programConfiguration)
{
var destinationEndPoint =
new IPEndPoint(_programConfiguration.DestinationIpAddress, programConfiguration.DestinationPort);
_networkProtocol =
new UdpNetworkProtocol(
log, statistics, destinationEndPoint, UdpNetworkProtocolType.Udp, _programConfiguration.PacketSize,
_programConfiguration.VerifyOrder);
_sendDataTask =
new HighResolutionTimer
{
Mode = TimerMode.Periodic,
Period = 1000,
Resolution = 0,
IsAsync = true
};
_sendDataTask.Tick += (sender, args) => SendData();
var bindedIp =
MachineAddress.FirstOrDefault(i => i.Equals(_programConfiguration.SourceIpAddress)) ?? IPAddress.Any;
var bindedPort = programConfiguration.SourcePort ?? 0;
_networkProtocol.Bind(new IPEndPoint(bindedIp, bindedPort));
if (programConfiguration.NetworkBufferSize.HasValue)
_networkProtocol.SetSendBufferSize(programConfiguration.NetworkBufferSize.Value);
}
示例4: BuildDriverDetailsViewModel
private DriverDetailsViewModel BuildDriverDetailsViewModel(Driver driver, Statistics statistic)
{
return new DriverDetailsViewModel
{
Name = driver.Name,
CurrentTeam = driver.CurrentTeam != null ? driver.CurrentTeam.Name : "* Not Contracted *",
AtomicName = driver.AtomicName,
BestQualifyingResult = statistic.BestQualifyingResult,
BestRaceResult = statistic.BestRaceResult,
BestChampionshipResult = statistic.BestChampionshipResult,
RacerRatio = statistic.RacerRatio,
Races = statistic.Entered,
Points = statistic.Points,
PointsPerRace = statistic.PointsPerRace,
Wins = statistic.Wins,
WinsPercent = statistic.WinsPercent,
Poles = statistic.Poles,
PolesPercent = statistic.PolesPercent,
Podiums = statistic.Podiums,
PodiumsPercent = statistic.PodiumsPercent,
FastestLaps = statistic.FastestLaps,
FastestLapsPercent = statistic.FastestLapsPercent,
Finishes = statistic.Finished,
FinishesPercent = statistic.FinishedPercent,
Seasons = statistic.Seasons
};
}
示例5: Start
// Use this for initialization
void Start()
{
gameMaster = Camera.main.GetComponent<GameMaster> ();
playerControl = Camera.main.GetComponent<PlayerControl> ();
stats = Camera.main.GetComponent<Statistics> ();
source = Camera.main.GetComponent<AudioSource> ();
}
示例6: Main
static void Main(string[] args)
{
// create the subject and observers
WeatherData weatherData = new WeatherData();
CurrentConditions conditions = new CurrentConditions(weatherData);
Statistics statistics = new Statistics(weatherData);
Forecast forecast = new Forecast(weatherData);
// create the readings
WeatherMeasurements readings = new WeatherMeasurements();
readings.humidity = 40.5F;
readings.pressure = 20F;
readings.temperature = 72F;
// update the readings - everyone should print
weatherData.UpdateReadings(readings);
// update
readings.pressure = 10F;
weatherData.UpdateReadings(readings);
// update
readings.humidity = 100;
readings.temperature = 212.75F;
readings.pressure = 950;
weatherData.UpdateReadings(readings);
Console.ReadLine();
}
示例7: LoadStatistics
private void LoadStatistics()
{
_filteredStatistics =
Service.FilteredStatistics ??
Service.RawStatistics ??
_filteredStatistics;
}
示例8: StressBenchmark
public StressBenchmark(Storage storage, BenchmarkOptions options)
{
this.storage = storage;
this.readDelayInSeconds = TimeSpan.FromSeconds(5);
this.statistics = new Statistics(readDelayInSeconds);
this.options = options;
}
示例9: Aura
public Aura()
{
Damage = new Damage();
Healing = new Damage();
Duration = 1f;
Cooldown = new Cooldown(1f);
Statistics = new Statistics();
}
示例10: GoToScene
public override void GoToScene(string sceneName)
{
//Saves the statistics in the Session object
Statistics stats = new Statistics(_score, _kills, _wave);
Session.Instance.GameStats = stats;
base.GoToScene(sceneName);
//GoToScene(Scene.GameOver);
}
示例11: btnPlot_Click
private void btnPlot_Click(object sender, EventArgs e)
{
Statistics stats = new Statistics(picFiles);
List<StatItem> statsList = stats.GenerateFocalStatsBar();
statsList.Sort();
new ChartForm(statsList, "bar").Show();
}
示例12: Chat
public Chat()
: base(new Irc("Tomestone", "oauth:npafwpg44j0a5iullxo2dt385n5jeco", new[] { MainChannel }))
{
var twitch = new TwitchConnection();
_userDatabase = new UserDatabase(_db, twitch);
_gameDatabase = new GameDatabase(_db, twitch);
_statistics = new Statistics(_userDatabase, _gameDatabase, twitch);
}
示例13: ActorDefinition
public ActorDefinition()
{
BaseStatistics = new Statistics();
Abilities = new List<Ability>();
Equipment = new List<ItemDefinition>();
Diameter = 1f;
MovementSpeed = 5f;
}
示例14: FormLines
public FormLines()
{
InitializeComponent();
game = new Game(numberOfCells, ShowItem, ShowStat, HandlingFinishInfo);
CreateBoxes();
this.Size = new Size(numberOfCells * cellSize + 10, numberOfCells * cellSize + 55);
timer.Enabled = true;
statistics = new Statistics("ToR.dat");
}
示例15: Game2048
public Game2048()
{
InitializeComponent();
InitBackColors();
InitLabels();
logic = new Logic(size, Show, ShowStat);
logic.InitGame();
statistics = new Statistics("ToR.dat");
}