Skip to content

Commit

Permalink
add executable
Browse files Browse the repository at this point in the history
  • Loading branch information
LeNitrous committed Jul 14, 2023
1 parent 072cc4e commit f3a3e54
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/source/Vignette.Desktop/bin/Debug/net7.0/Vignette.Desktop.dll",
"args": [],
"cwd": "${workspaceFolder}/source/Vignette.Desktop",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/source/Vignette.Desktop/Vignette.Desktop.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/source/Vignette.Desktop/Vignette.Desktop.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/source/Vignette.Desktop/Vignette.Desktop.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
7 changes: 7 additions & 0 deletions source/Vignette.Desktop/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright (c) Cosyne
// Licensed under GPL 3.0 with SDK Exception. See LICENSE for details.

using Sekai;
using Vignette;

Host.Run<VignetteGame>(new HostOptions { Name = "Vignette" });
34 changes: 34 additions & 0 deletions source/Vignette/VignetteGame.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright (c) Cosyne
// Licensed under GPL 3.0 with SDK Exception. See LICENSE for details.

using System;
using Sekai;
using Vignette.Graphics;

namespace Vignette;

public sealed class VignetteGame : Game
{
private Renderer renderer = null!;
private readonly Window root = new();

public override void Load()
{
renderer = new(Graphics);
}

public override void Draw()
{
root.Draw(renderer);
}

public override void Update(TimeSpan elapsed)
{
root.Update(elapsed);
}

public override void Unload()
{
root.Clear();
}
}

0 comments on commit f3a3e54

Please sign in to comment.