Skip to content

Commit

Permalink
add manager to game
Browse files Browse the repository at this point in the history
  • Loading branch information
LeNitrous committed Jul 16, 2023
1 parent f390f8e commit b9acd5d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/Vignette/VignetteGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using Sekai;
using Vignette.Audio;
using Vignette.Content;
using Vignette.Graphics;

Expand All @@ -13,18 +14,22 @@ public sealed class VignetteGame : Game
private Window root = null!;
private Camera camera = null!;
private Renderer renderer = null!;
private AudioManager audio = null!;
private ContentManager content = null!;
private ServiceLocator services = null!;

public override void Load()
{
audio = new(Audio);

content = new(Storage);
content.Add(new ShaderLoader(), ".hlsl");
content.Add(new TextureLoader(Graphics), ".png", ".jpg", ".jpeg", ".bmp", ".gif");

renderer = new(Graphics);

services = new();
services.Add(audio);
services.Add(content);

root = new(services)
Expand All @@ -41,6 +46,8 @@ public override void Draw()
public override void Update(TimeSpan elapsed)
{
camera.ViewSize = Window.Size;

audio.Update();
root.Update(elapsed);
}

Expand Down

0 comments on commit b9acd5d

Please sign in to comment.