Skip to content

Commit e8a7beb

Browse files
committed
Adjust visualizer to SadConsole V10
1 parent 9ff25c5 commit e8a7beb

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

Venomaus.Visualizers/Venomaus.SadConsole.Host/Core/GameLoop.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public Grid<int, VisualCell<int>> Grid
1919
get { return _grid ?? throw new Exception("Grid is not initialized!"); }
2020
}
2121

22-
public Renderer? _entityRenderer;
23-
public Renderer EntityRenderer { get { return _entityRenderer ??= new Renderer(); } }
22+
public EntityManager? _entityRenderer;
23+
public EntityManager EntityRenderer { get { return _entityRenderer ??= new EntityManager(); } }
2424

2525
private Player? _player;
2626
public Player Player

Venomaus.Visualizers/Venomaus.SadConsole.Host/Program.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
using SadConsole;
2+
using SadConsole.Configuration;
23
using Venomaus.SadConsoleVisualizer.Core;
34

45
namespace Venomaus.SadConsoleVisualizer
56
{
67
internal class Program
78
{
8-
private static void Main(string[] args)
9+
private static void Main()
910
{
1011
// Some settings
1112
Settings.ResizeMode = Settings.WindowResizeOptions.Stretch;
1213
Settings.AllowWindowResize = true;
1314
Settings.WindowTitle = Constants.ScreenSettings.GameWindowTitle;
1415

15-
// Setup the engine and create the main window.
16-
Game.Create(Constants.ScreenSettings.Width, Constants.ScreenSettings.Height);
16+
Builder gameStartup = new Builder()
17+
.SetScreenSize(Constants.ScreenSettings.Width, Constants.ScreenSettings.Height)
18+
.UseDefaultConsole()
19+
.OnStart((sender, args) => GameLoop.InitializeGameLoop());
1720

18-
// Hook the start event so we can add consoles to the system.
19-
Game.Instance.OnStart = GameLoop.InitializeGameLoop;
20-
21-
// Start the game.
21+
Game.Create(gameStartup);
2222
Game.Instance.Run();
2323
Game.Instance.Dispose();
2424
}

Venomaus.Visualizers/Venomaus.SadConsole.Host/Venomaus.SadConsole.Host.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="SadConsole.Host.MonoGame" Version="9.2.2" />
11+
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
12+
<PackageReference Include="SadConsole.Host.MonoGame" Version="10.0.0" />
1213
</ItemGroup>
1314

1415
<ItemGroup>

0 commit comments

Comments
 (0)