Skip to content

Commit

Permalink
fix my shit
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryImMouse committed Jul 14, 2024
1 parent 9fc5464 commit b5a3288
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Hypercube.Example/Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace Hypercube.Example;

public sealed class Example : IEventSubscriber, IPostInject
{
[Dependency] private readonly IAudioManager _audioManager = default!;
[Dependency] private readonly IResourceCacher _resourceCacher = default!;
[Dependency] private readonly IEventBus _eventBus = default!;
[Dependency] private readonly IEntitiesManager _entitiesManager = default!;
Expand Down Expand Up @@ -43,9 +44,11 @@ private void Startup(ref RuntimeStartupEvent args)
CreateEntity(coord);
}

var source = _resourceCacher.GetResource<AudioSourceResource>("/game_boi_3.wav").Stream;
var stream = _resourceCacher.GetResource<AudioSourceResource>("/game_boi_3.wav").Stream;
var source = _audioManager.CreateSource(stream);

// it's too loud :D
source.Gain = 0.3f;
source.Gain = 0.1f;
source.Start();
// var source = _audioManager.CreateSource("/game_boi_3.wav", new AudioSettings());
// source.Start();
Expand Down

0 comments on commit b5a3288

Please sign in to comment.