mirror of
https://github.com/whoswhip/RhythiaLib.git
synced 2026-12-05 09:18:42 +00:00
chore: setup & add examples solution/project
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../../RhythiaLib/RhythiaLib.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,31 @@
|
||||
using RhythiaLib.Rhr;
|
||||
|
||||
namespace PrintRHRData
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (args.Length == 0)
|
||||
{
|
||||
Console.WriteLine("No path provided");
|
||||
return;
|
||||
}
|
||||
string path = args[0];
|
||||
if (string.IsNullOrWhiteSpace(path) || !File.Exists(path))
|
||||
{
|
||||
Console.WriteLine("File not found");
|
||||
return;
|
||||
}
|
||||
|
||||
RhrReplay replay = RhrFile.Read(path);
|
||||
Console.WriteLine($"Version: {replay.Version}");
|
||||
Console.WriteLine($"Player: {replay.ScoreData.PlayerName}");
|
||||
Console.WriteLine($"Map: {replay.ScoreData.LegacyMapId}");
|
||||
Console.WriteLine($"Accuracy: {replay.ScoreData.Accuracy}%");
|
||||
Console.WriteLine($"Misses: {replay.ScoreData.Misses}");
|
||||
Console.WriteLine($"Score: {replay.ScoreData.TotalScore}");
|
||||
Console.WriteLine($"Frames: {replay.Frames.Count}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<Solution>
|
||||
<Project Path="PrintRHRData/PrintRHRData.csproj" />
|
||||
</Solution>
|
||||
Reference in New Issue
Block a user