Update method names for Game, add documentation for renderers, remove position argument from DrawSdfText and DrawDebugText in Renderer.
This commit is contained in:
@@ -6,7 +6,8 @@ using DaggerFramework.Audio;
|
||||
public class TestGame : Game
|
||||
{
|
||||
public override string ResourceRoot => "Resources/";
|
||||
protected override void OnStart()
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
_renderer = new RaylibRenderer();
|
||||
_audioBackend = new FmodAudioBackend();
|
||||
@@ -20,19 +21,21 @@ public class TestGame : Game
|
||||
_renderer.SetTargetFps(60);
|
||||
|
||||
_audioBackend.Initialize();
|
||||
_audioBackend.AddBusEffect<AudioEffectReverb>(new AudioEffectReverb());
|
||||
|
||||
_inputHandler.AddInputMapping("play", new InputAction[] { new KeyInputAction(KeyboardKey.Spacebar) });
|
||||
}
|
||||
|
||||
|
||||
protected override void LoadResources()
|
||||
{
|
||||
_soundLoader = new SoundLoader();
|
||||
_testSound = _soundLoader.Load($"{ResourceRoot}sounds/test_sound.ogg");
|
||||
}
|
||||
|
||||
protected override void MainLoop()
|
||||
protected override void Ready()
|
||||
{
|
||||
_audioBackend.AddBusEffect<AudioEffectReverb>(new AudioEffectReverb());
|
||||
_inputHandler.AddInputMapping("play", new InputAction[] { new KeyInputAction(KeyboardKey.Spacebar) });
|
||||
}
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
while (_renderer.ShouldRun)
|
||||
{
|
||||
@@ -57,6 +60,7 @@ public class TestGame : Game
|
||||
_renderer.Shutdown();
|
||||
_audioBackend.Shutdown();
|
||||
}
|
||||
|
||||
private Renderer _renderer;
|
||||
private SoundLoader _soundLoader;
|
||||
private Sound _testSound;
|
||||
|
||||
Reference in New Issue
Block a user